搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Make Firefox handle .aspx download requests correctly.

  • 3 个回答
  • 54 人有此问题
  • 6 次查看
  • 最后回复者为 CuriousGeorge

more options

The state of Pennsylvania uses a download link structure where the actual file is followed after a .aspx file. So, when a user downloads the file, instead of downloading the file intended, a file called filedownload.aspx is saved.

Example: http://www.emarketplace.state.pa.us/FileDownload.aspx?file=COSTARS%2003%20Rebid/Solicitation_0.pdf

The workaround was to assign .aspx to preview (or Acrobat), as they were almost always pdf files (and it was still downloading the actual file, just naming it filedownload.aspx). However, they are now using the same structure for word documents and other common file formats.

Example: http://www.emarketplace.state.pa.us/FileDownload.aspx?file=6100021599/Solicitation_0.docx

How do I make firefox download the actual file, not a file names filedownload.aspx?

The state of Pennsylvania uses a download link structure where the actual file is followed after a .aspx file. So, when a user downloads the file, instead of downloading the file intended, a file called filedownload.aspx is saved. Example: http://www.emarketplace.state.pa.us/FileDownload.aspx?file=COSTARS%2003%20Rebid/Solicitation_0.pdf The workaround was to assign .aspx to preview (or Acrobat), as they were almost always pdf files (and it was still downloading the actual file, just naming it filedownload.aspx). However, they are now using the same structure for word documents and other common file formats. Example: http://www.emarketplace.state.pa.us/FileDownload.aspx?file=6100021599/Solicitation_0.docx How do I make firefox download the actual file, not a file names filedownload.aspx?

所有回复 (3)

more options

EDITED

When I click your links, the correct application launches.

However, the site developer omitted something from the headers sent to the browser: the filename (part of the content-disposition header). So Firefox and IE both just use the page name FileDownload.

I can't think of an easy solution for this off the top of my head.

Please feel free to complain to the webmaster and point to this thread.

由jscher2000 - Support Volunteer于修改

more options

I see only a content type in the response headers:

Content-Type: application/pdf
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

As jscher2000 wrote above, there is no file name send as part of a content-disposition header, so your only option is to copy the file name part of the link (Copy Link Location) and use it as the file name.

more options

Seeing that this is a state government website, I doubt I'll get anywhere getting the site changed.

The problem is that other browsers in a Mac OS X 10.7 environment handle these links correctly. Well, somewhat correctly, but better than Firefox.

In Safari, the PDF file is viewable directly in the browser. The word document is handled the same way with firefox, saved as FileDownload.aspx

Chrome also opens the PDF file in the browser window. However, it also does a better job with the word document, saving it as FileDownload.docx This allows me to open the download directly into Word.

In all instances, if I change the file extension from .aspx to .pdf or .docx I can view the file in its native program, which shows that the correct file is being downloaded. But it seems to be handling the file extension wrong in firefox.