From 540868a029668559647a912994eb475e2e91e54c Mon Sep 17 00:00:00 2001 From: puri-ph4tt Date: Thu, 30 Nov 2023 15:30:31 +0700 Subject: [PATCH] fix: file download ui --- .../01_user/components/FileDownload.vue | 109 ++++++++++++------ 1 file changed, 71 insertions(+), 38 deletions(-) diff --git a/Services/client/src/modules/01_user/components/FileDownload.vue b/Services/client/src/modules/01_user/components/FileDownload.vue index ee5b1af..e616333 100644 --- a/Services/client/src/modules/01_user/components/FileDownload.vue +++ b/Services/client/src/modules/01_user/components/FileDownload.vue @@ -9,13 +9,14 @@ import { useFileInfoStore } from '@/stores/file-info-data' import FileIcon from '@/components/FileIcon.vue' const { isFilePreview, fileInfo } = storeToRefs(useFileInfoStore()) -const { getType, getFormatDate, getSize, getFileNameFormat } = useFileInfoStore() +const { getType, getFormatDate, getSize, getFileNameFormat } = + useFileInfoStore() async function downloadSubmit(path: any) { const [cabinet, drawer, folder, file] = path.split('/') const formatPath = `/cabinet/${cabinet}/drawer/${drawer}/folder/${folder}/file/${file}` const res = await axiosClient.get( - `${import.meta.env.VITE_API_ENDPOINT}${formatPath}` + `${import.meta.env.VITE_API_ENDPOINT}${formatPath}`, ) await axios .get(res.data.download, { @@ -36,9 +37,9 @@ async function downloadSubmit(path: any) {