Firefox download files with wrong name and no file extension.
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)
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.
cor-el said
You can check specific file extension keys (e.g. .mp3) in the registry with the registry editor.You can check a possibly linked MIME type in the MIME Database registry key and check the stored file extension.
- HKEY_CLASSES_ROOT\.xxx
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.
- HKEY_CLASSES_ROOT\MIME\Database\Content Type\
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.
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.
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:
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.
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?
I think that it would have to be this:
- filename*=UTF-8''02%20PILLOWTALK.m4a
(edited to correct the filename value)
Променено на
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.
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.
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
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 :)
Избрано решение
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.