修复某些文件上传失败的问题
This commit is contained in:
parent
92792ff6ba
commit
59f046d10c
@ -410,11 +410,11 @@ export default {
|
|||||||
// 文件状态设为“合并中”
|
// 文件状态设为“合并中”
|
||||||
this.statusSet(file.id, 'merging')
|
this.statusSet(file.id, 'merging')
|
||||||
api.mergeSimpleUpload({
|
api.mergeSimpleUpload({
|
||||||
filename: encodeURI(file.name),
|
filename: encodeIfNeeded(file.name),
|
||||||
relativePath: encodeURI(file.relativePath),
|
relativePath: encodeIfNeeded(file.relativePath),
|
||||||
identifier: file.uniqueIdentifier,
|
identifier: file.uniqueIdentifier,
|
||||||
folder: this.$route.query.folder,
|
folder: this.$route.query.folder,
|
||||||
currentDirectory: encodeURI(this.params.currentDirectory),
|
currentDirectory: encodeIfNeeded(this.params.currentDirectory),
|
||||||
username: this.params.username,
|
username: this.params.username,
|
||||||
userId: this.params.userId,
|
userId: this.params.userId,
|
||||||
totalSize: file.size,
|
totalSize: file.size,
|
||||||
|
|||||||
@ -32,6 +32,7 @@ function isEncoded(str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function encodeIfNeeded(str) {
|
export function encodeIfNeeded(str) {
|
||||||
|
console.log('str:', str, isEncoded(str))
|
||||||
if (isEncoded(str)) {
|
if (isEncoded(str)) {
|
||||||
return str;
|
return str;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user