修复某些文件上传失败的问题

This commit is contained in:
jmal 2024-03-26 18:00:56 +08:00
parent 92792ff6ba
commit 59f046d10c
2 changed files with 4 additions and 3 deletions

View File

@ -410,11 +410,11 @@ export default {
// 文件状态设为“合并中”
this.statusSet(file.id, 'merging')
api.mergeSimpleUpload({
filename: encodeURI(file.name),
relativePath: encodeURI(file.relativePath),
filename: encodeIfNeeded(file.name),
relativePath: encodeIfNeeded(file.relativePath),
identifier: file.uniqueIdentifier,
folder: this.$route.query.folder,
currentDirectory: encodeURI(this.params.currentDirectory),
currentDirectory: encodeIfNeeded(this.params.currentDirectory),
username: this.params.username,
userId: this.params.userId,
totalSize: file.size,

View File

@ -32,6 +32,7 @@ function isEncoded(str) {
}
export function encodeIfNeeded(str) {
console.log('str:', str, isEncoded(str))
if (isEncoded(str)) {
return str;
} else {