[ 
https://issues.apache.org/jira/browse/OFBIZ-6702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980182#comment-14980182
 ] 

Gareth Carter commented on OFBIZ-6702:
--------------------------------------

The inline change is not super important. I just felt it was better for our 
users to be able to view images and pdfs in the browser window (rather than 
force download) and thought it might be worth committing. 

Content-Disposition could be ignored by the browser (although I doubt latest 
mainstream browsers do not) or could be overridden by browser configuration, I 
know in firefox you can configure what to do based on mime type - 
https://support.mozilla.org/en-US/kb/applications-panel-set-how-firefox-handles-files.
 I do not know if inline/attachment is honoured if a specific action set


> Update SimpleContentViewHandler to return mime type on file extension and use 
> inline for content-disposition
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6702
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6702
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: Trunk
>            Reporter: Gareth Carter
>            Priority: Trivial
>         Attachments: SimpleContentViewHandler.java.patch, UtilHttp.java.patch
>
>
> SimpleContentViewHandler will return mime type 'text/html' for all 
> DataResource values without a specified mimeTypeId. Changing to 
> DataResourceWorker.getMimeType will allow determining the mimeTypeId by file 
> extension 
> Fixing the mime type will allow the browsers to display content inline if 
> UtilHttp is updated aswell. All unknown extensions will be set to 
> octet-stream causing the browser to prompt for download



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to