How can I edit Chrome MIME type mappings?

前端 未结 5 1511
[愿得一人]
[愿得一人] 2020-12-23 18:26

I opened a image/x-png type image in new tab, but Chrome just downloaded it. I googled it and found that Chrome doesn\'t interpret image/x-png as image fil

5条回答
  •  萌比男神i
    2020-12-23 19:07

    It seems that you can't edit your MIME type mappings, see "View As MIME Type" in Chrome or Firefox

    This answer https://stackoverflow.com/a/8724758/962091 is of particular interest. The author has made and open sourced a Chrome extension to open files as different MIME types via an added menu item on right-click, though it does not provide a global handling mechanism.

    EDIT:

    The extension by default only has the options to open as text/html and text/plain, but you can add any extensions you like, including image/png, in the extensions settings. Here's a test image.

    This bug was moved to Untriaged on August 13, 2012 in the Chromium bug tracker, so hopefully this will be fixed soon in Chrome as well.

提交回复
热议问题