From fc652996711384f695e97d42fe0b66a7bfaf7a44 Mon Sep 17 00:00:00 2001
From: Julien Veyssier <eneiluj@posteo.net>
Date: Mon, 29 Aug 2022 13:46:07 +0200
Subject: move attachment resolver axios call to ImageView

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
---
 src/nodes/ImageView.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/nodes/ImageView.vue')

diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue
index 6176d6024..8a7220e23 100644
--- a/src/nodes/ImageView.vue
+++ b/src/nodes/ImageView.vue
@@ -117,6 +117,7 @@
 
 <script>
 import { generateUrl } from '@nextcloud/router'
+import axios from '@nextcloud/axios'
 import { NodeViewWrapper } from '@tiptap/vue-2'
 import ClickOutside from 'vue-click-outside'
 import { Image as ImageIcon, Delete as DeleteIcon } from '../components/icons.js'
@@ -284,7 +285,10 @@ export default {
 			})
 		},
 		loadMediaMetadata(name) {
-			return this.$attachmentResolver.getMediaMetadata(name).then((response) => {
+			const metadataUrl = this.$attachmentResolver.getMediaMetadataUrl(name)
+			console.debug('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', metadataUrl)
+			return axios.get(metadataUrl).then((response) => {
+				console.debug('response', response.data)
 				this.attachmentMetadata = response.data
 			}).catch((error) => {
 				console.error(error)
-- 
cgit v1.2.3

