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

Jacques Le Roux commented on OFBIZ-6702:
----------------------------------------

I tried it but did not find so far a way to discern a sure difference between 
the two. As you kinda suggested before, it seems we are shooting a dead man. It 
more depends on the setting of you (modern) browser. All current major modern 
browsers handle that internally:
* FF: 
https://support.mozilla.org/en-US/kb/disable-built-pdf-viewer-and-use-another-viewer
* Chrome: http://www.cnet.com/how-to/how-to-disable-chromes-pdf-viewer/
* IE: 
https://stackoverflow.com/questions/30070363/how-to-disable-the-built-in-pdf-viewer-in-opera
* Safari: http://osxmactips.blogspot.fr/2009/06/disable-safari-pdf-viewing.html
* Opera: 
https://stackoverflow.com/questions/30070363/how-to-disable-the-built-in-pdf-viewer-in-opera

I did not test on a smarphone, but I guess they are at least as modern as my PC 
:p

This said I still believe it's a good idea because not everyone use a modern 
browser, and security is a must. So will commit soon the patch I will attach if 
nobody is against. 


> 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
>            Assignee: Jacques Le Roux
>            Priority: Trivial
>         Attachments: ContentDisposition.patch, 
> 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