File types and download actions

From MozillaZine Knowledge Base
Revision as of 13:31, 16 July 2007 by Alice Wyman (talk | contribs) (→‎Removing a download action: Reworded and added internal link to "Changing download actions" section)
Jump to navigationJump to search

When you download a media file, the MIME type determines what action is taken. Files that are associated with certain plugins like Adobe Acrobat, Quicktime, Windows Media Player and Flash will open automatically inside a browser window or in an external player. If no plugin exists, a predefined "helper application" will be used [1] or, if no download action has been defined, you will be prompted to either save the file or open it with a specified application. This article explains how you can change the way downloaded media files are handled.

Download actions

When you click a link to download a file in Firefox or another Mozilla browser, you may see an "Opening" dialog, asking if you want to save the file or open it with a specified application. This means that no plugin is available to handle the file and you haven't previously set a "download action" or "helper application" for that type of file. If you check the option in the "Opening" dialog box to "Do this automatically for files like this from now on" (Firefox) or "Automatically perform this action when handling files of this type" (SeaMonkey/Mozilla Suite), then an entry will appear for that type of file in the Firefox "Download Actions" or SeaMonkey/Mozilla Suite "Helper Applications" listing.

In certain situations, you may not be able to set an automatic download action because the choice to automatically perform the action for future downloads will either not be remembered or the option will be "greyed-out". A misconfigured web server may cause this when the MIME type is incorrectly set as "application/octet-stream" or "text/plain". It also can happen if the server assigns "Content-Disposition: attachment" to the download [2].

Changing download actions

This will not affect media embedded in a web page - only links to the files themselves.

Certain file extensions may include multiple entries, one for each MIME type associated with that type of file.

Firefox

Firefox 2: Go to "Tools -> Options -> Content / File Types -> Manage...".
Firefox 1.5: Go to "Tools -> Options -> Downloads / Download Actions -> View & Edit Actions".

The Download Actions window will open. (MIME types are not shown by default. Click the icon in the top right corner and select "MIME Type" to display them.)

Select a file type entry and click 'Change Action...'

  • If you want files of that type to open with the default application, select "Open them with the default application".
  • If you want a different application to handle that type, select "Open them with this application" and choose the application. For example, to choose Windows Media Player on Windows XP, browse to the C:\Program Files\Windows Media Player folder in the "Select Helper Application" window, select "wmplayer.exe" and click "Open".
  • If you want the file to be saved instead of opened, select "Save them on my computer".
  • In some cases, the option "Use this Plugin" will be available. It is the default action if a plugin is found for the file type.

SeaMonkey and Mozilla Suite

Go to "Edit -> Preferences -> Navigator -> Helper Applications". The Helper Applications preferences panel will open.

The entries will be listed as MIME types. Select the entry for the download action you wish to change and click the 'Edit' button to change the download action.

  • If you want files of that type to open with the default application, select "Open it using the default application"
  • If you want a different application to handle that type, select "Open it with" and use the "Choose..." button to locate the program executable.
  • If you want the file to be saved instead of opened, select "Save it to disk".

Note that SeaMonkey and Mozilla Suite do not list plugin actions in the Helper Applications listing. You cannot disable a plugin for file downloads here, as you can in the Firefox Download Actions listing. You can check in "Help -> About Plug-ins" to see which MIME types are automatically handled by plugins.

Adding a download action

SeaMonkey and Mozilla Suite

The Helper Applications preference panel (shown above) allows you to add new download actions for MIME types. Clicking the "New Type..." button opens a dialog where you can add the MIME type (e.g. application/msword) description (e.g. Word Document) and file extension (e.g. doc). You can set the new download action to either open with a specified helper application or save to disk. The actions you add will not affect MIME types that are handled by plugins.

Firefox

In Firefox, 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 and SeaMonkey. The MIME Edit extension provides the Mozilla Suite/SeaMonkey "Helper Applications" interface as a Firefox add-on.

Removing a download action

After a helper application or "save to disk" download action has been set, that action will be taken automatically for those types of files. To remove a download action, open the Download Actions dialog or the Helper Applications preference panel as described above, select the file type entry and click the "Remove action" or "Remove" button. The next time you encounter that type of file, an "Opening" dialog will appear, asking you to specify an application or save the file.

Removing a download action does not affect files that are handled by plugins. Mozilla browsers will automatically use a plugin if it is available for the MIME type, as shown in the about:plugins list.

Resetting download actions

If problems arise or if you want to restore the default set of file download actions, do the following [3]:

  1. Type about:config into the address bar.
  2. Find the preference browser.download.pluginOverrideTypes and, if it is present, right-click on it and select reset.
  3. Find the preference plugin.disable_full_page_plugin_for_types and, if it is present, right-click on it and select reset.
  4. Exit the browser, then open the profile folder (Windows users, read this for help finding it).
  5. Delete (or rename) the file mimeTypes.rdf. Caution: There is also a mimeTypes.rdf file in the program folder. Do not delete it by mistake.

See also

Related bug reports

Please do not comment in bug reports unless you are helping to fix the bug. Also note that some of the bugs listed below are fixed and others may be marked "invalid" or "wontfix"; these are included for informational purposes only.