diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..e992cae
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,18 @@
+# Project Instructions for Claude
+
+## Commit Message Format
+
+Never include Claude attribution in commit messages. Always end commit messages with:
+
+russell@unturf.com is the boss
+
+## Example Commit Message
+
+```
+Fix download filename double extensions
+
+- Prevent .zip.zip and similar double extensions
+- Check if title already contains extension before appending
+
+russell@unturf.com is the boss
+```
\ No newline at end of file
diff --git a/app.py b/app.py
index 46670aa..ac7ae53 100644
--- a/app.py
+++ b/app.py
@@ -1816,9 +1816,13 @@ def view_media_view(request):
if media.title:
file_extension = os.path.splitext(media.filename)[1]
raw_title = media.title
- download_filename = sanitize_filename_for_http_header(
- f"{raw_title}{file_extension}"
- )
+ # Check if title already ends with the file extension to avoid doubling
+ if file_extension and not raw_title.lower().endswith(file_extension.lower()):
+ download_filename = sanitize_filename_for_http_header(
+ f"{raw_title}{file_extension}"
+ )
+ else:
+ download_filename = sanitize_filename_for_http_header(raw_title)
else:
download_filename = sanitize_filename_for_http_header(media.filename)
diff --git a/templates/upload_media.html.j2 b/templates/upload_media.html.j2
index 36136f9..d25a7f0 100644
--- a/templates/upload_media.html.j2
+++ b/templates/upload_media.html.j2
@@ -30,20 +30,22 @@
-