Mozilla 도움말 검색

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

자세히 살펴보기

When I ask to save a file, the save dialog box in Firefox deletes the file extension (e.g., "doc", "pdf", "ofx") from the filename. I am using version 66.0.2

more options

When I ask to save a file, the save dialog box in Firefox deletes the file extension (e.g., "doc", "pdf", "ofx") from the filename. I am using version 66.0.2

The same file download works in chrome.

When I ask to save a file, the save dialog box in Firefox deletes the file extension (e.g., "doc", "pdf", "ofx") from the filename. I am using version 66.0.2 The same file download works in chrome.

선택된 해결법

Are you generating something like this:

Content-Disposition: attachment;filename="Test Widget Rename.json";

You could double-check that Firefox received it using the Network Monitor, if the download opens in the same tab. Note that the monitor doesn't start logging until you open it:

  • "3-bar" menu button > Web Developer > Network
  • (menu bar) Tools > Web Developer > Network
  • (Mac) Command+Alt+e
  • (Windows) Ctrl+Shift+e

When you click the request for the download, the Response Headers usually are displayed in the right side by default but, if another panel is selected, click Headers.

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

모든 댓글 (6)

more options

Hi LearningAboutTech, that definitely shouldn't happen. Is that the only part cut off?

A known issue is that Firefox stops at the first space in the file name if the site didn't put quotation marks around it when sending it. Most sites do it right, but there are some exceptions. But any space in the name usually would be way before the file extension, so that may be unrelated.

Does it help to set Finder to show all file extensions? In Finder, click the Finder menu, then Preferences, then on the Advanced panel, check the box for "Show all filename extensions".

more options

Hi JSCHER - Thank you for you reply. The server is owned by me - yes the file name from the server looks like "Test Download" ( double quotation marks around filename).

The extension(.json) is still missing. I would want the extension to be showed to make the experience across browsers the same.

more options

선택된 해결법

Are you generating something like this:

Content-Disposition: attachment;filename="Test Widget Rename.json";

You could double-check that Firefox received it using the Network Monitor, if the download opens in the same tab. Note that the monitor doesn't start logging until you open it:

  • "3-bar" menu button > Web Developer > Network
  • (menu bar) Tools > Web Developer > Network
  • (Mac) Command+Alt+e
  • (Windows) Ctrl+Shift+e

When you click the request for the download, the Response Headers usually are displayed in the right side by default but, if another panel is selected, click Headers.

more options

Hi - Yes using the content disposition header. The file is being downloaded in a seperate tab and hence I am not sure how can I can inspect in a seperate tab.

``` response.setHeader(PlatformService.Constants.CONTENT_DISPOSITION,"attachment;filename=" + fileName + ".json");```

more options

(Sorry, no markdown here. You can use <pre> and </pre> around blocks you don't want to wrap, or <code> and </code> to use a monospace font but allow wrapping.)

response.setHeader(PlatformService.Constants.CONTENT_DISPOSITION, "attachment;filename=" + fileName + ".json");

Is that Node, or Java, or .Net, or ???

You need more quotation marks inside your quotation marks. If you can use ' interchangeably with " then try this:

response.setHeader(PlatformService.Constants.CONTENT_DISPOSITION, 'attachment;filename="' + fileName + '.json"');

If your language or style guidelines don't allow using ' in place of " then use whatever method of escaping you need to achieve the same effect.

Success?

more options

That helped - Thank you for your time!