Vote #64166
未完了MIME type support for repository Entries
70%
説明
I didn't like that images didn't just load in the browser that were in a repository, and felt there should be some MIME support, so I gave it a shot. I think it works for any files (with MIME type or not, which just defaults to the old behavior). I don't know the Redmine code base well, and I'm not a Ruby programmer, so it was a quick attempt.
journals
--------------------------------------------------------------------------------
A slight fix: I think line #125 should read:
send_data @content, :filename => fn, :type => type, :disposition => 'inline'
rather than:
send_data @content, :filename => fn, :type => type, => 'inline'
--------------------------------------------------------------------------------
+1, I like it very much. It keeps annoying me that files won't open in the browser even if the mime-type in the repository are set properly.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Patch for the current #2823 revision.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
As I described at #4477, I implemented this feature at r5210.
I don't know whether "inline" needs or not.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,Closed,4477,Use mime types in downloading from repository
relates,Closed,6256,Redmine considers non ASCII and UTF-16 text files as binary in SCM
relates,New,3770,text/html documents force currently firefox to open download dialog
relates,Closed,6374,File raw view mode
relates,Closed,5055,Set mime-type in response when downloading repository files
relates,Closed,6370,UTF-8 BOM only partially hidden
relates,Closed,4577,convert text file attached an issue to utf-8.