diff MoinMoin/items/content.py @ 1898:2b4bcb80d644

for archive members, force attachment download mode, so it uses the member filename, fixes #306
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 24 Dec 2012 00:10:20 +0100
parents df3e72208eed
children d4a382f781c9
line wrap: on
line diff
--- a/MoinMoin/items/content.py	Sun Dec 23 23:23:19 2012 +0100
+++ b/MoinMoin/items/content.py	Mon Dec 24 00:10:20 2012 +0100
@@ -358,6 +358,9 @@
             mt = MimeType(filename=filename)
             content_length = None
             file_to_send = self.get_member(member)
+            # force attachment download, so it uses attachment_filename
+            # otherwise it will use the itemname from the URL for saving
+            force_attachment = True
         else: # content = item revision
             rev = self.rev
             filename = rev.item.name