marklieberman / downloadstar

Download all items in a webpage that match a pattern
GNU General Public License v3.0
90 stars 16 forks source link

Content-Disposition header is not supported #7

Open pandronic opened 7 years ago

pandronic commented 7 years ago

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).

marklieberman commented 7 years ago

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

MichelePezza commented 6 years ago

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

marklieberman commented 6 years ago

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

MichelePezza commented 6 years ago

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