Skip to content

Commit ea791da

Browse files
committed
An attempt with encodeFilePath (which always adds a / to the front)
1 parent e2f0ffd commit ea791da

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

js/viewer-main.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/viewer-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mixins/PreviewUrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
if (isPublic()) {
5050
return generateUrl(`/s/${getToken()}/download?path=${encodeURIComponent(this.filename.replace(this.basename, ''))}&files=${encodeURIComponent(this.basename)}`)
5151
}
52-
return getRootPath() + this.filename.split('/').map((x) => encodeURIComponent(x)).join('/')
52+
return getRootPath() + encodeFilePath(this.filename)
5353
},
5454
},
5555
methods: {

0 commit comments

Comments
 (0)