downloadstar icon indicating copy to clipboard operation
downloadstar copied to clipboard

Content-Disposition header is not supported

Open pandronic opened this issue 7 years ago • 4 comments

So, my use case involves a PHP script (let's say invoices.php) that generates a PDF file based on some parameters. I use the following headers:

Content-Type: application/pdf
Content-Disposition: inline; filename="invoiceXXXX.pdf"

* where XXXX is a different number

Upon clicking, Firefox will open the link with the built-in PDF viewer, DownThemAll! will download the links with the corresponding names, DownloadStar will download them with the filename of the PHP script (invoices.php).

pandronic avatar Sep 20 '17 15:09 pandronic

I won't be able to support this until https://bugzilla.mozilla.org/show_bug.cgi?id=1245652 is implemented.

marklieberman avatar Sep 20 '17 17:09 marklieberman

Rob--W found a solution without waiting for API implementation content-disposition.js

MichelePezza avatar Jul 17 '18 09:07 MichelePezza

@MichelePezza That just parses the header to get the filename. Web extensions doesn't even give me the header.

marklieberman avatar Jul 17 '18 12:07 marklieberman

take a look Save in web extension an look for "// Chrome: Skip HEAD request for Content-Disposition and use onDeterminingFilename" in the text....

MichelePezza avatar Jul 17 '18 19:07 MichelePezza