How do you associate an action with a file type in Firefox 3.0?
I'm trying to associate a specific action with a file type in Firefox 3.0.
When I go to Edit > Preferences > Applications, there is no way to add a file type, such as MP3. I can edit existing file types and their behaviours, but I can't add any new ones.
There are instructions that say to click Edit > Preferences > Content > File Types > Advanced button, but I think that's for a different version of Firefox, because it's not actually there in 3.0.
Is there a way to do this on the fly, when I click a link? Is there a clever extension that makes this relatively simple thing finally easy to do?
Solution 1:
What you're looking for is the mimeTypes.rdf
file in your Firefox's profile folder.
A word of warning before you go any further, the mimeTypes.rdf
file is not meant to be directly edited by users, and if you mess up it could stop your Firefox working.
Where your profile folder is depends on what OS you're running, see here for how to find your profile folder: Firefox Profile Locations.
It is an RDF file, which is a type of data file similar in some ways to XML, but its heirarchy works differently, this does mean that if you're careful you can read and edit it with a text editor. MozillaZine's knowledgebase has an article on the mimeTypes.rdf file here. You'll want to read up on the RDF format (more than what's in the link I just quoted) because its not quite as simple as XML to just paste in a new line to do what you want.
Solution 2:
See here: http://kb.mozillazine.org/File_types_and_download_actions
Unable to set an automatic action
In some cases, you may not be able to set an automatic download action. This can occur when a misconfigured web server assigns an incorrect MIME type, such as "application/octet-stream", shown here in SeaMonkey 1.x or if the server assigns "Content-Disposition: attachment" to the file download, as shown here in SeaMonkey 1.x ( the MIME type of a downloaded file, and whether it should be handled as an attachment, does not appear in Firefox or in SeaMonkey 2). [4] [5] When this happens, the option to always perform the same action will either be "grayed-out" or, in Firefox, selecting the "Do this automatically" option will not seem to have an effect and you will again be asked what to do when you next encounter that file type (see below for related bug reports). There is little you can do in these cases because the problem is at the server end.
Adding a download action
MIME types that are not handled by plugins do not appear in the Download Actions listing unless you have previously encountered that type of file and checked the option in the "Opening" dialog box to "Do this automatically for files like this from now on", as described above. You cannot add new file types to the Download Actions listing in Firefox, as you can in Mozilla Suite/SeaMonkey 1.x. The Mimetype Editor/Download Actions extension provides the SeaMonkey 1.x "Helper Applications" interface, shown below, as a Firefox add-on.
It was so much nicer when they allowed us to add file types/actions.
Solution 3:
In firefox 74, the solution seems to be as for Firefox 60 (Thanks for that advice).
I wanted to add a handler for Zoommtg for the zoom meeting application. It seems that the zoom installer probably creates this tag, but only for the Mac user account that zoom is installed in (the administrator account). Trying to run the installer in a normal user account just resulted in the installer quiting (presumably because zoom.us was already installed). I added into handlers.json:
"application/zoom":{"action":2,"ask":true,"extensions":["zoommtg"]},
Then I went into Firefox preferences, and selected the zoom.us application to be opened. I then clicked on the zoom meeting link and got it to launch the right applications. Eventually, the saved file contained:
"application/zoom":{"action":2,"extensions":["zoommtg"],"handlers":[{"name":"zoom.us","path":"/Applications/zoom.us.app"}],
and
"zoommtg":{"action":4,"ask":true}
probably only the latter is actually needed.