|
@@ -87,9 +87,11 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let a = document.createElement("a");
|
|
|
- a.href = res.data;
|
|
|
- a.target = "_blank";
|
|
|
+ a.href = res.data.file_path; // Use the file_path from the response
|
|
|
+ a.download = res.data.file_name; // Set the download attribute to the file_name
|
|
|
+ document.body.appendChild(a);
|
|
|
a.click();
|
|
|
+ document.body.removeChild(a);
|
|
|
}
|
|
|
);
|
|
|
},
|