X
Tap here to go to the mobile version of the site.

منتدى الدعم

How can I override server mime types, to always get mp3/rar/sid/bin files directly to the 'where do you want to save this file' dialog?

Posted

I used to be able to click MP3 files, way back when, and Firefox would ask where I wanted to save them. Nowadays it opens a new tab with a flash player. Clicking on 'unknown' files, like .sid, .prg, .zip, .rar pops up 'This is a BIN file. [Cancel] [Save]'. It does not give me a checkbox for 'always do this'. I would like the option to edit so that some file types, such as PDF, regardless of mimetype, always get opened in a new tab if clicked. Also some file types, based on extension, always go directly to 'Where do you want to save the file?' dialog box, regardless if there's a builtin player or viewer or not. In my Firefox (41.0.1 Ubuntu 14.04LTS 32-bit) I never get the 'do this for these files always' choice anymore. Googling led me to delete my mimeTypes.rdf file, and since then even 'well known' file extensions, like .zip, are treated as BIN files and I get the Cancel-or-Save box for those, too - again without the choice to 'always save BIN files'.

I used to be able to click MP3 files, way back when, and Firefox would ask where I wanted to save them. Nowadays it opens a new tab with a flash player. Clicking on 'unknown' files, like .sid, .prg, .zip, .rar pops up 'This is a BIN file. [Cancel] [Save]'. It does not give me a checkbox for 'always do this'. I would like the option to edit so that some file types, such as PDF, regardless of mimetype, always get opened in a new tab if clicked. Also some file types, based on extension, always go directly to 'Where do you want to save the file?' dialog box, regardless if there's a builtin player or viewer or not. In my Firefox (41.0.1 Ubuntu 14.04LTS 32-bit) I never get the 'do this for these files always' choice anymore. Googling led me to delete my mimeTypes.rdf file, and since then even 'well known' file extensions, like .zip, are treated as BIN files and I get the Cancel-or-Save box for those, too - again without the choice to 'always save BIN files'.

Chosen solution

Those file are send as Content-Type: application/octet-stream and Content-Disposition: attachment; For files send that way you can't save an automatic action. You can see that in the Network monitor.

Content-Disposition: attachment; filename="TURRICAN_AMIGA_PORT.sid";
Content-Type: application/octet-stream
Read this answer in context 1

Additional System Details

Installed Plug-ins

  • Net iD
  • Shockwave Flash 11.2 r202

Application

  • Firefox 41.0.1
  • User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:41.0) Gecko/20100101 Firefox/41.0
  • Support URL: https://support.mozilla.org/1/firefox/41.0.1/Linux/en-US/

Extensions

  • Block LinkBucks 1.86 (dgs229@nyu.edu)
  • Disable Ctrl-Q Shortcut 20120821.1-signed (dcqs@moongiraffe.net)
  • Flashblock 1.5.18.1-signed ({3d7eb24f-2740-49df-8937-200b1cc08f8a})
  • Ghostery 5.4.8.1 (firefox@ghostery.com)
  • Mason 0.3.7.9.18.1-signed ({F632A5EA-F825-4AE7-94B5-233CFBA9F423})
  • Music Player Minion 2 2.2.0.1-signed (Music_Player_Minion@code.google.com)
  • Open in Browser 1.16 (openinbrowser@www.spasche.net)
  • QuickJava 2.0.6.1-signed ({E6C1199F-E687-42da-8C24-E7770CC3AE66})
  • RightToClick 2.9.5.1-signed ({cd617375-6743-4ee8-bac4-fbf10f35729e})
  • uBlock Origin 1.2.0 (uBlock0@raymondhill.net)
  • Classic Theme Restorer 1.4.0 (ClassicThemeRestorer@ArisT2Noia4dev) (Inactive)
  • Flash and Video Download 1.76 ({bee6eb20-01e0-ebd1-da83-080329fb9a3a}) (Inactive)
  • Flash Block 4.20.13.1-signed ({95ab36d4-fb6f-47b0-8b8d-e5f3bd547953}) (Inactive)
  • FlashGot 1.5.6.12.1-signed ({19503e42-ca3c-4c27-b1e2-9cdb2170ee34}) (Inactive)
  • Groove Shredder 1.14.10.1-signed (grooveshredder@code.argee.org) (Inactive)
  • Ubuntu Firefox Modifications 2.8 (ubufox@ubuntu.com) (Inactive)
  • Ubuntu Online Accounts 0.5 (online-accounts@lists.launchpad.net) (Inactive)
  • Unity Desktop Integration 2.4.8 (webapps-team@lists.launchpad.net) (Inactive)
  • Unity Websites integration 2013.09.20.beta ({2e1445b0-2682-11e1-bfc2-0800200c9a66}) (Inactive)
  • User Agent Quick Switch 0.5.2.1-signed (jid0-62jR3sq6mHTLknusEa92dfyvGcs@jetpack) (Inactive)

Javascript

  • incrementalGCEnabled: True

Graphics

  • adapterDescription: nouveau -- Gallium 0.4 on NV4B
  • adapterDeviceID: Gallium 0.4 on NV4B
  • adapterDrivers:
  • adapterRAM:
  • adapterVendorID: nouveau
  • driverDate:
  • driverVersion: 2.1 Mesa 10.1.3
  • info: {u'AzureCanvasBackend': u'cairo', u'AzureFallbackCanvasBackend': u'none', u'AzureContentBackend': u'cairo', u'AzureSkiaAccelerated': 0}
  • numAcceleratedWindows: 0
  • numAcceleratedWindowsMessage: [u'']
  • numTotalWindows: 10
  • supportsHardwareH264: False
  • webglRenderer: nouveau -- Gallium 0.4 on NV4B
  • windowLayerManagerRemote: True
  • windowLayerManagerType: Basic

Modified Preferences

Misc

  • User JS: No
  • Accessibility: No
cor-el
  • Top 10 Contributor
  • Moderator
17567 solutions 158879 answers

Firefox can play MP3 files natively with the HTML5 media player (i.e. it is not a Flash player that you see).

To prevent that you can set media.gstreamer.enabled to false on the about:config page.

The choice to do this automatically is only available when the server sends the file with a valid MIME type and not when a generic content type like application/octet-stream is used.

Firefox can play MP3 files natively with the HTML5 media player (i.e. it is not a Flash player that you see). To prevent that you can set media.gstreamer.enabled to false on the <b>about:config</b> page. The choice to do this automatically is only available when the server sends the file with a valid MIME type and not when a generic content type like application/octet-stream is used.

Question owner

Thanks! - That solved one of my questions, in that MP3 files now are clickable - and even gave me the option to choose to always do this in the future - saving the file locally.

Any tips on how to recreate this success for other mime types or file extensions?

Thanks! - That solved one of my questions, in that MP3 files now are clickable - and even gave me the option to choose to always do this in the future - saving the file locally. Any tips on how to recreate this success for other mime types or file extensions?
cor-el
  • Top 10 Contributor
  • Moderator
17567 solutions 158879 answers

You would need a copy of the previous mimeTypes.rdf file to recover those actions. Otherwise you would have to wait until you come across a link to such a file where Firefox allows to save the action.

You would need a copy of the previous mimeTypes.rdf file to recover those actions. Otherwise you would have to wait until you come across a link to such a file where Firefox allows to save the action.

Question owner

Well, here's such a link: Clicking on either the .sid or .prg download on the page http://csdb.dk/release/?id=141841 (under Download; a site for Commodore 64 releases), gives me the "You have chosen to open the file Turrican.sid which is a BIN file

[ ]  Open it as [Text (dropdown menu of choices)]
[x] Save file
[Cancel] [Ok]"

No option to choose 'always do this for this file type' in the dialog box. :/

Well, here's such a link: Clicking on either the .sid or .prg download on the page http://csdb.dk/release/?id=141841 (under Download; a site for Commodore 64 releases), gives me the "You have chosen to open the file Turrican.sid which is a BIN file [ ] Open it as [Text (dropdown menu of choices)] [x] Save file [Cancel] [Ok]" No option to choose 'always do this for this file type' in the dialog box. :/
cor-el
  • Top 10 Contributor
  • Moderator
17567 solutions 158879 answers

Chosen Solution

Those file are send as Content-Type: application/octet-stream and Content-Disposition: attachment; For files send that way you can't save an automatic action. You can see that in the Network monitor.

Content-Disposition: attachment; filename="TURRICAN_AMIGA_PORT.sid";
Content-Type: application/octet-stream
Those file are send as Content-Type: application/octet-stream and Content-Disposition: attachment; For files send that way you can't save an automatic action. You can see that in the Network monitor. *https://developer.mozilla.org/Tools/Network_Monitor Content-Disposition: attachment; filename="TURRICAN_AMIGA_PORT.sid"; Content-Type: application/octet-stream