This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox Keeps Changing File Extensions for 'Odd' File Type

  • 24 replies
  • 1 has this problem
  • 1 view
  • Last reply by AliceWyman

more options

Like I said in the title, Firefox keeps changing the file extension for 'odd' file type when downloading them. I say 'Odd' because I download this type of file almost every day. They're a .ts4script file type, which is a file type for modding The Sims 4. Up until today they were downloading just fine, but now firefox keeps changing them into .zip files.

While this slightly makes sense as a .ts4script IS a zipped up file that contains python files it's very annoying to have to manually change the file type after downloading more than a few at the same time...

Is there maybe a setting I may have accidentally changed or something?

Like I said in the title, Firefox keeps changing the file extension for 'odd' file type when downloading them. I say 'Odd' because I download this type of file almost every day. They're a .ts4script file type, which is a file type for modding The Sims 4. Up until today they were downloading just fine, but now firefox keeps changing them into .zip files. While this slightly makes sense as a .ts4script IS a zipped up file that contains python files it's very annoying to have to manually change the file type after downloading more than a few at the same time... Is there maybe a setting I may have accidentally changed or something?
Attached screenshots

Chosen solution

This is very similar to a thread about .story files that the server in that case also identified as being application/zip type files (.story files converted to .zip upon download).

I don't know why Firefox 84 has started "correcting" the file extension in these cases. Perhaps it was to fix some other problem?

(I have attached the Browser Console info showing the Content-Type sent by the server, for reference.)


If you would consider using an add-on to work around this, I have a suggestion.

I have an extension called Content-Type Fixer that checks the file extensions of downloads and lets you override the Content-Type. Here's how you would set that up for these files:

(1) Install the extension: https://addons.mozilla.org/firefox/addon/content-type-fixer/

(2) Click its Zzzz button to start it

(3) Trigger the download (you can cancel after you get the dialog)

(4) Click the toolbar button again to open the menu, then "Add/Edit Content Types (View Log)"

(5) Near the top of the log, find the problem download, and click its "Add" button

(6) I don't think there is an official MIME type for these files, so you can simply keep the suggested fictitious MIME type and click Save Content-Type

(7) Switch to your tab with the link and try the download again -- the dialog should look more like the attached image:

Success? That should continue while the extension is "awake" (if you need to go back to the built-in handling, you can disable the overriding from the menu or turn off the extension).

Read this answer in context 👍 2

All Replies (20)

more options

Can we replicate the issue and try to download the same files? Also, can you post of pic of these settings from your browser? see screenshot

more options

So the files I showed in the images are from here, specifically the .ts4script files. https://www.patreon.com/posts/leroidetout-stop-41967978

I have included a screenshot of those settings, and they're set to 'save file' but the issues is that it's changing the file extension to .zip when it is not a .zip file. Even if I change the setting to 'always ask' it still changes the file extension.

more options
more options

jonzn4SUSE said

I think this should help you. https://support.mozilla.org/en-US/questions/772086

I'm not quite sure how that should help me? Firefox is changing the file extension, not opening the files.

Also I replied with the URL for where you can find a .ts4script to see if you can replicate the issue, but it says my post needs to be reviewed by a moderator so it's not showing up right now.

more options

I'm curious... you mentioned that this is file is a zipped up file. What happens when you use Chrome or Edge to download the file? Since TS4SCRIPT archives are compressed with Zip compression why not just change the setting in your screenshot to "Always ask" what to do with the file instead of using 7zip. This setting appears to be why Firefox is going with .zip.

Modified by jonzn4SUSE

more options

I did change it to always ask before posting to be sure. Even when I changed it to 'always ask' firefox was still trying to download the file as a zip file. Except then I had to pick where the file downloaded to.

I'm not trying to open the file at all, it needs to stay as a .ts4script for the game to be able to read it. I just want it to download as it's file type so I can move it to another folder.

more options

I created a .ts4script file and download it from my one drive and extension did not change.

more options

Is it possible for me to download the file?

more options

Like I said earlier, I tried to link the post that has a file that is changing but when I hit post it said a moderator has to review it, I'm assuming because of the link. Let me try again and see...

EDIT: Nope, it won't let me post the link.

Modified by dewdrp

more options

This is the post I was downloading from in my first post though. https://www.patreon.com/posts/leroidetout-stop-41967978

more options

I now see the issue also in linux. see screenshot

more options

Oh yay so it's not just my computer being a jerk! And my post was approved so that's nice lol, but yeah that's what is happening for me exactly, no matter if I have Firefox save it automatically to my Downloads directory or if I have it ask me every time.

more options

Ok, I found something that's heading in the right direction, but I cannot get that file type to work. Maybe one of the moderators can help get .ts4script in the handlers.json file and then have Firefox not see the file as a .zip. I got the file type in my Applications, but the browser is stuck on .zip. see screenshot

https://support.mozilla.org/en-US/questions/1262664

more options

Hopefully they can, I also have the file type in my Applications but again it's still stuck downloading them as .zip files. Also it's really strange because up until probably yesterday or the day before it was downloading that file type fine. Though I can't remember if my Firefox updated or not so who knows...

more options

Could be something similar to another thread where content sniffing seems to change the file extension to match the detected file type.

more options

Interesting... I thought I already tested in Win10, but anyway it's working for me. see screenshot

I'm also going to post my handlers.json file. Save your current as old_handler.json and make a new one with mine. Close the browser, reopen it and cross your fingers.  ;-))

Here is the path to my file. Just put in your username and you should find the file. C:\Users\username\AppData\Roaming\Mozilla\Firefox\Profiles\vd1v32ob.default <---- Verify your current profile by going to the help page in your browser under Trouble shooting info

*** handler.json ***
{"defaultHandlersVersion":{"en-US":4},"mimeTypes":{"application/pdf":{"action":2,"extensions":["pdf"],"ask":true},"application/x-zip-compressed":{"action":0,"ask":true,"extensions":["zip"]},"image/jpeg":{"action":0,"ask":true,"extensions":["jpg"]},"text/html":{"action":0,"ask":true,"extensions":["html"]},"text/xml":{"action":3,"extensions":["xml"]},"image/svg+xml":{"action":2,"extensions":["svg"],"ask":true},"image/webp":{"action":3,"extensions":["webp"]}},"schemes":{"ircs":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"mailto":{"action":4,"handlers":[null,{"name":"Yahoo! Mail","uriTemplate":"https://compose.mail.yahoo.com/?To=%s"},{"name":"Gmail","uriTemplate":"https://mail.google.com/mail/?extsrc=mailto&url=%s"}]},"irc":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"webcal":{"action":2,"ask":true},"sfb":{"action":4},"hpdia2":{"action":4,"ask":true},"hpwebproductsdetection3":{"action":4},"hpwebproductsdetection2":{"action":4}}}

Modified by jonzn4SUSE

more options

That browser console looks interesting, but I'm not sure how to replicate the steps needed for this issue.

Modified by jonzn4SUSE

more options

What happen to my post moderators? It was there for a minute and now it's gone.

more options

Let's try again... The site works for me in Win 10. see screenshot.

more options

Here is a link to my handler_json file text. Create a new one with the text from the below link.

https://pastebin.com/2tD9XFEC

  1. 1
  2. 2