mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 20:49:03 +08:00
fix: 解决上传文件夹失败的问题 (#2843)
This commit is contained in:
parent
8599a858e4
commit
4b4f53d09b
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user