Feature #27822

Remove filename from attachment preview links

Added by Felix Schäfer 6 months ago. Updated 6 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:4.1.0


Some of our users reported being confused by the attachment previews. The most common use-case was a variation of:
  1. right-click on the link of the attachment on the issue page,
  2. "save link as" to save the attachment to disk,
  3. send the saved file to a user not on the Redmine.

With the current URL scheme for attachment preview pages (/attachments/:id/:filename), when the users click the preview attachment link instead of the download attachment link, the resulting html file still has the filename of the attachment. If the user does not have a look at the attachment before using it for something else, the user might have downloaded the html preview page instead of the attachment itself.

27822.patch Magnifier (1.51 KB) Felix Schäfer, 2017-12-19 14:47


#1 Updated by Felix Schäfer 6 months ago

The attached patch changes the URL rendered to preview pages from /attachments/:id/:filename to /attachments/:id. Both URLs work before and after the patch, so this will for example not break plugins or links coming from external sites. The links to the preview attachment pages in Redmine will not have the filename in the URL, thus if a user erroneously downloads that instead of the attachment the downloaded file will be called 123.html instead of image.png for example.

#2 Updated by Go MAEDA 6 months ago

  • Target version set to Candidate for next major release

#3 Updated by Go MAEDA 6 months ago

  • Target version changed from Candidate for next major release to 4.1.0

Also available in: Atom PDF