fix: 将文件URL中的编码斜杠替换为确保正确的路径格式
This commit is contained in:
parent
18195746a3
commit
ed1bd0f1f5
@ -38,6 +38,7 @@ export default {
|
||||
let baseUrl = serverUrl || this.baseUrl
|
||||
let fileUrl = `${baseUrl}/file/${store.getters.name}${encodeURIComponent(file.path)}${encodeURIComponent(file.name)}`
|
||||
fileUrl = fileUrl.replaceAll(/%5C/g, '/')
|
||||
fileUrl = fileUrl.replaceAll(/%2F/g, '/')
|
||||
|
||||
if (file.userId !== store.getters.userId && token && !shareToken) {
|
||||
return `${baseUrl}/pre-file/${file.id}/${encodeURIComponent(file.name)}?jmal-token=${token}&name=${username}`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user