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:
Diffstat (limited to 'src/nodes/ImageView.vue')
-rw-r--r--src/nodes/ImageView.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue
index ddbf75bcb..b97ee1613 100644
--- a/src/nodes/ImageView.vue
+++ b/src/nodes/ImageView.vue
@@ -173,7 +173,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') {
@@ -189,6 +189,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])
},
@@ -275,7 +278,6 @@ export default {
return
}
const img = new Image()
- img.src = this.imageUrl
img.onload = () => {
this.imageLoaded = true
}
@@ -284,6 +286,7 @@ export default {
this.imageLoaded = false
this.loaded = true
}
+ img.src = this.imageUrl
},
methods: {
updateAlt() {