Merge pull request #433 from jamebal/dev

fix(file-config): 对文件名进行 URI 编码
This commit is contained in:
jmal 2025-06-29 12:10:46 +08:00 committed by GitHub
commit 01cad1ed79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,9 +145,9 @@ export default {
},
directFileUrl: function(mark, file) {
if (file.isFolder) {
return window.location.origin + `${this.baseUrl}/direct-file/${mark}/${file.name}.zip`
return window.location.origin + `${this.baseUrl}/direct-file/${mark}/${encodeURI(file.name)}.zip`
} else {
return window.location.origin + `${this.baseUrl}/direct-file/${mark}/${file.name}`
return window.location.origin + `${this.baseUrl}/direct-file/${mark}/${encodeURI(file.name)}`
}
}
}