diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2021-10-22 17:07:07 +0300 |
---|---|---|
committer | Julien Veyssier <eneiluj@posteo.net> | 2022-01-03 12:27:34 +0300 |
commit | 7267f0b71d931ee9c464c1607cf9f5ed7a1a7e87 (patch) | |
tree | aca70e1ca1ede9880f690a7a99162c65e69c0971 /src/nodes/ImageView.vue | |
parent | a103b9834596abaecf21584ff08543a9ee4315db (diff) |
display/upload/add-link works with attachment folder in user context
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'src/nodes/ImageView.vue')
-rw-r--r-- | src/nodes/ImageView.vue | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index 8a36cbc7a..07a27ea7e 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -115,6 +115,23 @@ export default { } }, imageUrl() { + if (this.src.startsWith('text://')) { + const imageFileId = getQueryVariable(this.src, 'imageFileId') + const textFileId = getQueryVariable(this.src, 'textFileId') + if (getCurrentUser()) { + return generateUrl('/apps/text/image?textFileId={textFileId}&imageFileId={imageFileId}', + { + textFileId, + imageFileId, + }) + } else { + return generateUrl('/apps/text/image/public?textFileId={textFileId}&imageFileId={imageFileId}', + { + textFileId, + imageFileId, + }) + } + } if (this.isRemoteUrl || this.isPreviewUrl) { return this.src } |