修复某些文件上传失败的问题
This commit is contained in:
parent
92792ff6ba
commit
59f046d10c
@ -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,
|
||||
|
||||
@ -32,6 +32,7 @@ function isEncoded(str) {
|
||||
}
|
||||
|
||||
export function encodeIfNeeded(str) {
|
||||
console.log('str:', str, isEncoded(str))
|
||||
if (isEncoded(str)) {
|
||||
return str;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user