From 4b4f53d09b8e2e3e30654d1e8967463437117560 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:37:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#2843)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/host/file-management/upload/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/host/file-management/upload/index.vue b/frontend/src/views/host/file-management/upload/index.vue index 35d9af030..4079aa0ed 100644 --- a/frontend/src/views/host/file-management/upload/index.vue +++ b/frontend/src/views/host/file-management/upload/index.vue @@ -166,7 +166,11 @@ const submit = async () => { if (fileSize <= 1024 * 1024 * 50) { const formData = new FormData(); formData.append('file', file.raw); - formData.append('path', path.value); + if (file.raw.webkitRelativePath != '') { + formData.append('path', path.value + '/' + getPathWithoutFilename(file.raw.webkitRelativePath)); + } else { + formData.append('path', path.value); + } await UploadFileData(formData, {}); success++; uploaderFiles.value[i].status = 'success';