diff options
author | Louis Chemineau <louis@chmn.me> | 2022-09-28 23:20:53 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-10-10 12:23:52 +0200 |
commit | 142fe8363862a750bfa6cf728ba7f81fa2e3b683 (patch) | |
tree | 65909778a8ad63ce2be356d1f8b4340f9fd4fe3b /src/components/File.vue | |
parent | a2890b03e795184863e4252fd535fa6037b86235 (diff) |
Make public pages work
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'src/components/File.vue')
-rw-r--r-- | src/components/File.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/File.vue b/src/components/File.vue index ca1d11c9..9e414701 100644 --- a/src/components/File.vue +++ b/src/components/File.vue @@ -201,7 +201,12 @@ export default { }, getItemURL(size) { - return generateUrl(`/apps/photos/api/v1/preview/${this.file.fileid}?x=${size}&y=${size}`) + const token = this.$route.params.token + if (token) { + return generateUrl(`/apps/photos/api/v1/publicPreview/${this.file.fileid}?x=${size}&y=${size}&token=${token}`) + } else { + return generateUrl(`/apps/photos/api/v1/preview/${this.file.fileid}?x=${size}&y=${size}`) + } }, |