Change the response content type to force documents to open in or outside the browser window or in a special view mode (PDF, XML...)
This extension is in beta state, please send feedback on your experiences and wishes! 'Modify Content-Type' allows manipulation of the Content-Type and Content-Disposition HTTP header fields of incoming documents. This may be helpful if you like to force the browser to either show a document inside the browser window or to offer it as a download. It also can be used to override unknown mime types sent by misconfigured servers. Just replace them by f.e. 'application/pdf' or 'application/xml' and Chrome will know how to show the document. Permissions: - 'Access your data on all websites': required to get access to the http headers of requested documents. Updates: - 0.2 -- added support for multiple rules per URL
- (2019-10-14) Michael Stephenson: Any example how to use it? https://sd-app-01:8443/assystnet/attachments/Attachment?linkedObjectId=11587969&linkedObjectTypeId=46&attachmentId=1607746&attachmentDate=1570695459307 How convert it to png?
- (2019-06-29) Richard Yang: Only extension available that was able to render a PDF in browser. All I had to do was change octet-stream to pdf (mime-type) and attachment to inline.
- (2019-02-19) aparna shilpa: Extension works great but it is no longer supported by latest version of Chrome Browser (72). Any tips on getting this working ?
- (2019-02-18) John Chen: not work in 72.0.3626.109
- (2018-08-05) Martin Hering: It works for PDFs for me. Using the following settings: URL Filter: .* Original Type: application/.*pdf Replacement Type: application/pdf Disposition: inline
- (2018-02-02) Rohit R: Please provide instruction on how to use it. What rule to be added to open all png images in browser itself (for all websites i visit). Currently when i click on a png, its downloading the image..
- (2017-06-07) István Ujj-Mészáros: Works like a charm (not when opening a file directly, but works through a web server). I am using it to view txt files as HTML.
- (2016-09-15) Alessandro Meroni: very useful for filter larger xml files to be opened from chrome!!
- (2016-06-21) Mike Crews: This is perfect for fixing over-engineered web applications like JIRA and Confluence that force your browser to download content that could easily be displayed inline.
- (2016-04-11) doesnt work at all
- (2015-10-28) Vijay Srivastava: You can use this to render git row file, which normally comes with text out put.
- (2015-05-04) Brad Stronger: I added a simple rule to change all image/png to Disposition: inline. No more stupid image downloads!
- (2015-02-11) Dex Luther: Kinda sad I have to download an add-on to do something the browser should be able to do on it's own. Thanks for making this available to correct yet another one of Chrome's pitfalls. The instructions could be a lot better to make this a lot easier to use.
- (2015-01-21) Rohit N.: Awesome, works great, you need to know regex though but the instructions are great!
- (2015-01-08) George Averill: Lets me view textual files that the browser normally tries to download. Thanks!
- (2014-06-25) Daniel Raj Norman Vaseehar: how to use this tool to change the content type
- (2014-06-05) Maryann Frank: i loved it because we are so fast of typeing
- (2014-03-08) Juan Rodriguez: Do what it says. Easy to use.
- (2013-12-13) Justinas Bedzinskas: Very useful extension which we are using in our project! 5 stars.
- (2013-12-02) Jay Quibodeaux: Very useful extension! Specifically addresses Chrome's inability to figure out that if Content-Type contains, e.g., "image/png" in the string, it's a safe bet it's a PNG and is fine to display in its own browser window if you so choose (Chrome can't understand "image/png;charset=UTF-8") :-\. Would give 5 stars if instructions were clearer.
- (2019-11-27, v:0.2) Mark Pictor: Does not work cross-site?
I browse to a page on https://jenkins.corp.com and click a link for a file (a jenkins artifact, build.properties). This redirects to https://corp-devops.s3.amazonaws.com/jenkins/blah/build.properties?X-Amz-Security-Token=blah , which then downloads. I've tried and tried, but can't seem to convince the plugin to prevent the download and display instead - I have it set to modify the type from binary/octet-stream to text/plain and set disposition to inline, but no luck. I was able to use Modify Content-Type before we changed jenkins' storage to s3, so I'm thinking the redirect might break it. If this redirect really is the issue, is there any workaround? I'd try debugging but I'm not sure that's possible with extensions downloaded from the chrome store. Is it possible to view a log of actions taken/not taken and which regex did/did not match?
- (2019-07-19, v:0.2) ashtono7: Not working as intended
I'm using arcgis server and there seems to be an issue with how the program handles attachments on hosted feature layers. It feeds jpeg images to the browser as application/octet-stream. I found your program and configured a rule for the site but the behavior hasn't changed. I used the following settings: URL Filter: webapps\.seconnections\.com Original Type: application/octet-stream Replacement Type: image/jpeg Disposition: inline Am I configuring this properly or did I make a syntactical error? I'm pulling my hair out trying to troubleshoot this. I can't fix this on the server and am waiting for esri to address and patch. Any help you can provide would be greatly appreciated.
- (2018-11-18, v:0.2) Need Proper Content To Make a Rule
What should be the rule to get Chrome to open png files in the browser instead of downloading them?
- (2018-10-08, v:0.2) Michael Allan: Simply does not work for me
Maybe I’m making an obvious mistake here, but the following rule fails on Chrome 69/Linux. URL Filter: /architectonic Original Type: .* Replacement Type: application/xhtml+xml Disposition: <unchanged> Still I see plain text (wrong) when loading from URL “file:///home/mike/work/wayic/architec/architectonic”.
- (2018-08-09, v:0.2) Martin Hering: Possible to exclude url?
I'm having no luck excluding only a certain URL (google) from my rule – is this not possible?
- (2018-05-21, v:0.2) Local Files
Can this extension be used to force local .aspx files to open as html, and if so, how?
- (2017-12-20, v:0.2) Σταύρος Ντέντος: Skip Replacement Type
My main usecase is to piece-wise change "CD: inline" (so I don't care "replacing" the type the document)
- (2016-04-16, v:0.2) Terrell K: How to change disposition only
I would like to just be able to set all files to have disposition inline, no matter what. I tried using (.*) for the original mimetype and \1 for the replacement, meaning it would be the same, but that didn't work.
- (2015-10-28, v:0.2) Vijay Srivastava: Disable feature.
It is very helpful. I have two suggestion: 1- It would be great if you add disable feature. 2- Please write some document (as I spent a lot of time to searching how to start. It was not under "chrome://apps/".)
- (2015-02-23, v:0.2) Ravikiran Janardhana: Changing Content-Disposition only
How do I change only the content-disposition for a particular regex pattern ?