fix:解决pdf打不开的问题

This commit is contained in:
tt 2024-10-22 11:40:23 +08:00
parent 9f72e21463
commit d7a84f7e46
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ export default {
const link = document.createElement("a"); const link = document.createElement("a");
const objectUrl = URL.createObjectURL(blob); const objectUrl = URL.createObjectURL(blob);
link.href = objectUrl; link.href = objectUrl;
link.download = url.split("/").pop(); // Extract filename from URL link.download = fileUrl.split("/").pop(); // Extract filename from URL
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
document.body.removeChild(link); document.body.removeChild(link);