Merged in feature/IO-3281-imgproxy-download-hotfix (pull request #2381)

IO-3281 Prevent broken stream reseting HTTP headers.
This commit is contained in:
Patrick Fic
2025-06-25 22:36:47 +00:00

View File

@@ -46,11 +46,16 @@ export function JobsDocumentsImgproxyDownloadButton({ bodyshop, galleryImages, i
}
function standardMediaDownload(bufferData) {
const a = document.createElement("a");
const url = window.URL.createObjectURL(new Blob([bufferData]));
a.href = url;
a.download = `${identifier || "documents"}.zip`;
a.click();
try {
const a = document.createElement("a");
const url = window.URL.createObjectURL(new Blob([bufferData]));
a.href = url;
a.download = `${identifier || "documents"}.zip`;
a.click();
} catch (error) {
setLoading(false);
setDownload(null);
}
}
const handleDownload = async () => {