🐛修复共享文件时的图片预览
This commit is contained in:
parent
456b7ad4bd
commit
4a5227f7d5
@ -9,12 +9,12 @@ export default {
|
||||
},
|
||||
// 预览文件的url
|
||||
previewUrl: function(username, file, token) {
|
||||
let path = "/"
|
||||
if (file.path.length > 1) {
|
||||
path = encodeURI(file.path.substr(1, file.path.length - 2))
|
||||
}
|
||||
const filename = encodeURI(file.name);
|
||||
if (token) {
|
||||
let path = "/"
|
||||
if (file.path.length > 1) {
|
||||
path = encodeURI(file.path.substr(1, file.path.length - 2))
|
||||
}
|
||||
const filename = encodeURI(file.name);
|
||||
return `${this.baseUrl}/file/${username}/${path}/${filename}?jmal-token=${token}`
|
||||
} else {
|
||||
return `${this.baseUrl}/file/${username}/${path}/${filename}`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user