Merged in hotfix/2025-06-25 (pull request #2382)
IO-3281 Prevent broken stream reseting HTTP headers.
This commit is contained in:
@@ -46,11 +46,16 @@ export function JobsDocumentsImgproxyDownloadButton({ bodyshop, galleryImages, i
|
|||||||
}
|
}
|
||||||
|
|
||||||
function standardMediaDownload(bufferData) {
|
function standardMediaDownload(bufferData) {
|
||||||
const a = document.createElement("a");
|
try {
|
||||||
const url = window.URL.createObjectURL(new Blob([bufferData]));
|
const a = document.createElement("a");
|
||||||
a.href = url;
|
const url = window.URL.createObjectURL(new Blob([bufferData]));
|
||||||
a.download = `${identifier || "documents"}.zip`;
|
a.href = url;
|
||||||
a.click();
|
a.download = `${identifier || "documents"}.zip`;
|
||||||
|
a.click();
|
||||||
|
} catch (error) {
|
||||||
|
setLoading(false);
|
||||||
|
setDownload(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDownload = async () => {
|
const handleDownload = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user