In the JS code in Re^3: Can two separate responses be sent to the client's browser from Perl, such as via fork{}?, this: var blob = new Blob([pdf], {type: "octet/stream"}); creates the blob with the specific download header to go into an <a> tag. You are right, this must be changed to var blob = new Blob([pdf], {type: "application/pdf"});. Then follow the rest on how to create the <a>. Please note: good practice is that when you are done with the download link you must tell the browser to release the blob data it created with window.URL.createObjectURL(blob) like:
var objurl = window.URL.createObjectURL(blob); ... // i am done with this link now window.URL.revokeObjectURL(objurl);
So, now your dynamic download link should contain the right headers.
In reply to Re^7: Can two separate responses be sent to the client's browser from Perl, such as via fork{}?
by bliako
in thread Can two separate responses be sent to the client's browser from Perl, such as via fork{}?
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |