Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

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

Make Firefox handle .aspx download requests correctly.

  • 3 odgovori
  • 54 ima ovaj problem
  • 6 views
  • Posljednji odgovor poslao 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?

All Replies (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.

Izmjenjeno od strane 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.