Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Junek <michal@junek.pw>2022-02-04 15:41:20 +0300
committerMichal Junek <michal@junek.pw>2022-02-07 16:49:22 +0300
commit76a1f000a4f9c1b621c292cf8fc36125ce613c0a (patch)
treef6276b00e300164dd39c941c628fb39b0363603a /src/nodes/ImageView.vue
parentb8e9d8e2590133b2525dae6302a1978af5e2d327 (diff)
[master] Render data URL images as-is
Signed-off-by: Michal Junek <michal@junek.pw>
Diffstat (limited to 'src/nodes/ImageView.vue')
-rw-r--r--src/nodes/ImageView.vue5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue
index 11117d2bc..f8bd2ad6c 100644
--- a/src/nodes/ImageView.vue
+++ b/src/nodes/ImageView.vue
@@ -170,7 +170,7 @@ export default {
})
}
}
- if (this.isRemoteUrl || this.isPreviewUrl) {
+ if (this.isRemoteUrl || this.isPreviewUrl || this.isDataUrl) {
return this.src
}
if (this.hasPreview && this.mime !== 'image/gif') {
@@ -186,6 +186,9 @@ export default {
return this.src.match(/^(\/index.php)?\/core\/preview/)
|| this.src.match(/^(\/index.php)?\/apps\/files_sharing\/publicpreview\//)
},
+ isDataUrl() {
+ return this.src.startsWith('data:')
+ },
basename() {
return decodeURI(this.src.split('?')[0])
},