We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

Firefox download .csv files as .json

more options

Some time in the last month or so Firefox has started downloading .csv files as .json. I need the files in .csv format so I can work with them in Excel. These are large files I don't want to deal with the trouble of converting them every time. I've started using Chrome just so the files download correctly. I can't find any setting to change to make .csv the default again.

Some time in the last month or so Firefox has started downloading .csv files as .json. I need the files in .csv format so I can work with them in Excel. These are large files I don't want to deal with the trouble of converting them every time. I've started using Chrome just so the files download correctly. I can't find any setting to change to make .csv the default again.

선택된 해결법

Thank you for the example.

I clicked the Tables button and tried a download. I was promised five six files (first screenshot), which could only mean it would be a compressed archive like a ZIP file. When I check the details of the server response on the download (second screenshot), they named the file with a .zip extension but they erroneously identified it as a JSON file. So Firefox (un)helpfully changed the file extension from .zip to .json (sigh).

This is the new behavior I mentioned earlier that is going to change in Firefox 85 because too many sites are sending mixed signals. So for now, instead of renaming .json files with a .csv extension, they should be renamed with a .zip extension either during or after saving.

Alternately... I have an add-on that can override the erroneous content-type automatically when sites have specified a .zip extension. It's this one, and you turn it on by clicking the Zzzz button it adds to the toolbar:

https://addons.mozilla.org/firefox/addon/content-type-fixer/

Even if it's only going to be useful to you until Firefox 85 is released, maybe it's worth a try?

문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (4)

more options

I am still downloading .csv files as such. On one site I click on a downloader provided by the website, on another I right-click the file and select "save link as". I download other types of files as well, all without any issue.

more options

Firefox 84 has a feature to "correct" certain file extensions to match the type of file the server says it is. So in the case of the CSV files, it's possible -- although it would be very weird -- that the site is identifying the file using the content-type application/json instead of text/csv (or other CSV-specific content-type). That's going to be turned off in Firefox 85, but for now, that's one possible explanation.

In that case, simply renaming the file extension from .json to .csv will work around the issue because Firefox isn't changing the internal format of files when it changes the extension. Can you check that?

If you are actually getting a JSON file from the site instead of CSV, hmm, maybe there's something wrong with the format selection feature of the site. Can you give more information about what site has this problem?

Note: if you share a URL, please break it by inserting a space before the .com. Otherwise, your reply will be delayed in appearing because links trigger spam moderation.

more options

I'm downloading the files from the Census Bureau https://data.census.gov /cedsci/advanced. I've attached a screenshot of the download menu. It says the files should be .csv but they download as .json. They should download as a zipped folder with the .csv files inside. They still download this way with Chrome. There is no menu to change the file type before the download starts and I choose to either save the file or open it.

more options

선택된 해결법

Thank you for the example.

I clicked the Tables button and tried a download. I was promised five six files (first screenshot), which could only mean it would be a compressed archive like a ZIP file. When I check the details of the server response on the download (second screenshot), they named the file with a .zip extension but they erroneously identified it as a JSON file. So Firefox (un)helpfully changed the file extension from .zip to .json (sigh).

This is the new behavior I mentioned earlier that is going to change in Firefox 85 because too many sites are sending mixed signals. So for now, instead of renaming .json files with a .csv extension, they should be renamed with a .zip extension either during or after saving.

Alternately... I have an add-on that can override the erroneous content-type automatically when sites have specified a .zip extension. It's this one, and you turn it on by clicking the Zzzz button it adds to the toolbar:

https://addons.mozilla.org/firefox/addon/content-type-fixer/

Even if it's only going to be useful to you until Firefox 85 is released, maybe it's worth a try?

글쓴이 jscher2000 - Support Volunteer 수정일시