แก้ชื่อเอกสารตอนดาวน์โหลดตามชื่อเอกสารที่แสดง
This commit is contained in:
parent
6ad6b4bcab
commit
9aa0708c48
3 changed files with 21 additions and 26 deletions
|
|
@ -173,15 +173,15 @@ const fetchData = async (id: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
const downloadFile = (response: any, filename: string) => {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
link.setAttribute("download", fileName);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
// const downloadFile = (response: any, filename: string) => {
|
||||
// const link = document.createElement("a");
|
||||
// var fileName = filename;
|
||||
// link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
// link.setAttribute("download", fileName);
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// document.body.removeChild(link);
|
||||
// };
|
||||
|
||||
const popUp = (action: "pass" | "passNot") => {
|
||||
reasonReign.value = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue