I serve a BLOB from my server to the clients browser included PDF-Reader.
const file = new File([data], filename, { type: contentType });const url = URL.createObjectURL(file);const anchorElement = document.createElement("a");document.body.appendChild(anchorElement);anchorElement.href = url;anchorElement.target = "_blank";
This worked great, but the filename when downloaded from the reader was the assigned GUID.Since the newest patch for Chromium (or maybe a few before idk) this no longer works.
The file is displayed correctly in the reader and all PDF-properties are written correctly ,but I can no longer download the file. When downloading the file, the .pdf extension, is no longer added and the download then fails with
couldn't download - network issue
This also happens if I add the .pdf extension and Chromium recognizes the file as a PDF.I can download the file by anchorElement.download
without a problem and I can print an PDF from the reader without a problem.
It still works fine on FF or Safari.