ปรับ upload ไฟล์
This commit is contained in:
parent
cd06223e26
commit
2777eea7f5
1 changed files with 5 additions and 5 deletions
|
|
@ -50,9 +50,9 @@ const files = [
|
||||||
{
|
{
|
||||||
id: "file3",
|
id: "file3",
|
||||||
fileName:
|
fileName:
|
||||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก.)",
|
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
||||||
pathName:
|
pathName:
|
||||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก.)",
|
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "file4",
|
id: "file4",
|
||||||
|
|
@ -123,6 +123,7 @@ function downloadFile(name: string) {
|
||||||
const link = res.data.downloadUrl;
|
const link = res.data.downloadUrl;
|
||||||
const type = res.data.fileType;
|
const type = res.data.fileType;
|
||||||
const fileName = res.data.fileName;
|
const fileName = res.data.fileName;
|
||||||
|
|
||||||
getPDF(link, type, fileName);
|
getPDF(link, type, fileName);
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
|
|
@ -145,7 +146,6 @@ function getPDF(url: string, type: string, fileName: string) {
|
||||||
const a = document.createElement("a");
|
const a = document.createElement("a");
|
||||||
a.href = window.URL.createObjectURL(res.data);
|
a.href = window.URL.createObjectURL(res.data);
|
||||||
a.download = fileName;
|
a.download = fileName;
|
||||||
// a.download = res.data.fileName + `.${mime.getExtension(res.data.fileType)}`
|
|
||||||
a.click();
|
a.click();
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
|
|
@ -168,8 +168,8 @@ function onWebSite() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.evaluationApproveDoc1(id.value))
|
.put(config.API.evaluationApproveDoc1(id.value))
|
||||||
.then((res) => {})
|
.then(() => {})
|
||||||
.catch((e) => {})
|
.catch(() => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
|
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
|
||||||
getStep();
|
getStep();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue