為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Firefox download files with wrong name and no file extension.

  • 12 回覆
  • 8 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

Firefox don't download files with the right name example:

'song.mp3' is downloaded as 'song'

If I rename the file adding the extension it opens. But that's annoying and I really do not want to have to do this with every file.

Tried recreating user profile, deleting 'mimeTypes.rdf' ...

Firefox don't download files with the right name example: 'song.mp3' is downloaded as 'song' If I rename the file adding the extension it opens. But that's annoying and I really do not want to have to do this with every file. Tried recreating user profile, deleting 'mimeTypes.rdf' ...

被選擇的解決方法

The extension or the Network Monitor would at least tell you the complete file name, so you can rename the file. This is about the HTTP response headers, so you would need an extension or external software (Privoxy) that modifies this specific header.

從原來的回覆中察看解決方案 👍 0

所有回覆 (12)

more options

You can check specific file extension keys (e.g. .mp3) in the registry with the registry editor.

  • HKEY_CLASSES_ROOT\.xxx

You can check a possibly linked MIME type in the MIME Database registry key and check the stored file extension.

  • HKEY_CLASSES_ROOT\MIME\Database\Content Type\

All changes that you make in the registry editor are applied instantly and that there is no undo possible. You can export key(s) in the registry editor before making changes. If you are not comfortable with editing the Windows Registry then it is best to skip editing registry keys.

more options

cor-el said

You can check specific file extension keys (e.g. .mp3) in the registry with the registry editor.
  • HKEY_CLASSES_ROOT\.xxx
You can check a possibly linked MIME type in the MIME Database registry key and check the stored file extension.
  • HKEY_CLASSES_ROOT\MIME\Database\Content Type\
All changes that you make in the registry editor are applied instantly and that there is no undo possible. You can export key(s) in the registry editor before making changes. If you are not comfortable with editing the Windows Registry then it is best to skip editing registry keys.

I do not understand what I was supposed to do? I mean just check to see if theres a key for the file extension?

Anyway, I checked and there is a key for the .mp3 and .m4a extension, wich are the ones causing me trouble dpwnloading.

I just do not have any idea of how can I edit registry keys to work with firefox.

more options

There can be a sub key listed in the MIME Database registry key that sets the file extension to an empty string instead of the expected .mp3 For mp3 files you can check HKEY_CLASSES_ROOT\.mp3 and if it links to a key in MIME\Database then check that key as well.

more options

cor-el said

There can be a sub key listed in the MIME Database registry key that sets the file extension to an empty string instead of the expected .mp3 For mp3 files you can check HKEY_CLASSES_ROOT\.mp3 and if it links to a key in MIME\Database then check that key as well.


Everything seems okay with registry keys. I also tried to download the same file with Chrome, and it downloaded it right. Firefox still downloading as this:

more options

You can possibly use the Live Http Headers extension to check the file name in the HTTP response headers in case there are spaces in the file name that aren't escaped properly.

more options

cor-el said

You can possibly use the Live Http Headers extension to check the file name in the HTTP response headers in case there are spaces in the file name that aren't escaped properly.

Content-Disposition: attachment;filename*=utf-802 PILLOWTALK.m4a;filename="02 PILLOWTALK.m4a"

so the space between 02 e P is causing Firefox to break the Download? Why Chrome understands it and Firefox don't?

more options

I think that it would have to be this:

  • filename*=UTF-8''02%20PILLOWTALK.m4a

(edited to correct the filename value)

由 cor-el 於 修改

more options

cor-el said

I think that it would have to be this:
  • filename*=UTF-802%20PILLOWTALK.m4a

So this is it... There's no way to fix it if the webmaster doesn't rename the file. There are any extensions that could do the trick for me? Or do I really have to report to the site that they don't work with Firefox.

more options

The server sends both the 'old' version with the filename enclosed in quotes and the filename* version with type and locale included. Firefox will use the filename* version if found and that version is broken. For this website you would have to remove this part in the HTTP response headers to make Firefox only see the filename enclosed in double quotes and that should work. File names with spaces are always a bit of a problem and should best be avoid and have spaces replaced by underscores. If spaces are escaped then you can end up in some cases with a %20 in the name.

more options

I just noticed that the forum has mangled my reply and is hiding the two single quotes that would hold the locale.

  • filename*=UTF-8''02%20PILLOWTALK.m4a
more options

Can I edit a HTTP using the previous addon you linked me? Anyway, I see its a complicated issue and I don't feel like doing that everytime, I may use other browser to download in this website.

I really appreciate your time cor-el :)

more options

選擇的解決方法

The extension or the Network Monitor would at least tell you the complete file name, so you can rename the file. This is about the HTTP response headers, so you would need an extension or external software (Privoxy) that modifies this specific header.