Project

General

Profile

Actions

Feature #4477

closed

Use mime types in downloading from repository

Added by Felix Schäfer almost 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
2009-12-23
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Ok, so appart from the export: links in "wiki" fields looking ugly (are there plans to make them show either only the filename or even make the links "configurable" like http links?), I had a user asking if there was a way to make the pdfs he had in the repo be shown in the browser instead of force-downloading them.

I have whipped up a small patch (somewhat looked off of the mimetype-fu plugin) that guesses the mime-type of a file according to its extension and Mime::Type and sets the disposition to inline to make browsers show them instead of downloading them. The patch is attached, but it changes the behavior of the "raw" download action also used by the download-Link in the repository tab.

That brings us to the discussion if the "raw" Links should be changed, or if an extra action, say show, should be configured, but the changes to the patch should be quite straightforward.

Last but not least: there are only a very few mime types defined in redmine at the moment, one source for some more could e.g. be this list from the mimetype-fu plugin.


Files


Related issues

Related to Redmine - Defect #6256: Redmine considers non ASCII and UTF-16 text files as binary in SCMClosedToshi MARUYAMA2010-08-31

Actions
Related to Redmine - Feature #2209: MIME type support for repository EntriesClosed2008-11-17

Actions
Has duplicate Redmine - Feature #5055: Set mime-type in response when downloading repository filesClosedToshi MARUYAMA2010-03-11

Actions
Actions

Also available in: Atom PDF