Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/pages/ScanResults.jsx
Browse files
frontend/src/pages/ScanResults.jsx
CHANGED
|
@@ -199,6 +199,7 @@ export const ScanResults = () => {
|
|
| 199 |
const blob = await res.blob();
|
| 200 |
const url = window.URL.createObjectURL(blob);
|
| 201 |
const a = document.createElement('a');
|
|
|
|
| 202 |
let filename = '';
|
| 203 |
const disposition = res.headers.get('Content-Disposition');
|
| 204 |
if (disposition && disposition.includes('filename=')) {
|
|
@@ -222,7 +223,7 @@ export const ScanResults = () => {
|
|
| 222 |
document.body.appendChild(a);
|
| 223 |
a.click();
|
| 224 |
a.remove();
|
| 225 |
-
window.URL.revokeObjectURL(url);
|
| 226 |
} else {
|
| 227 |
setError("Failed to compile PDF Report. Server error.");
|
| 228 |
}
|
|
|
|
| 199 |
const blob = await res.blob();
|
| 200 |
const url = window.URL.createObjectURL(blob);
|
| 201 |
const a = document.createElement('a');
|
| 202 |
+
a.href = url;
|
| 203 |
let filename = '';
|
| 204 |
const disposition = res.headers.get('Content-Disposition');
|
| 205 |
if (disposition && disposition.includes('filename=')) {
|
|
|
|
| 223 |
document.body.appendChild(a);
|
| 224 |
a.click();
|
| 225 |
a.remove();
|
| 226 |
+
setTimeout(() => window.URL.revokeObjectURL(url), 100);
|
| 227 |
} else {
|
| 228 |
setError("Failed to compile PDF Report. Server error.");
|
| 229 |
}
|