summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-12-22 00:44:38 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-01-16 11:28:05 +0100
commit0da2ea61cc0aaacff3806541745b0f583317b6de (patch)
tree86e94ec2e8a8beac7308272c50a0f06470477c29 /apps
parent15b14378824b53dbfd9358d082a12dccfd314d76 (diff)
downloadnextcloud-server-0da2ea61cc0aaacff3806541745b0f583317b6de.tar.gz
nextcloud-server-0da2ea61cc0aaacff3806541745b0f583317b6de.zip
fix(files): Fix reference picker not working
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/views/FileReferencePickerElement.vue10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/files/src/views/FileReferencePickerElement.vue b/apps/files/src/views/FileReferencePickerElement.vue
index 6e0e8d9bc10..b139c5e79a1 100644
--- a/apps/files/src/views/FileReferencePickerElement.vue
+++ b/apps/files/src/views/FileReferencePickerElement.vue
@@ -31,6 +31,8 @@
<script>
import { FilePickerVue } from '@nextcloud/dialogs'
import { generateUrl } from '@nextcloud/router'
+import logger from '../logger.js'
+
export default {
name: 'FileReferencePickerElement',
components: {
@@ -52,15 +54,17 @@ export default {
{
label: t('files', 'Choose'),
type: 'primary',
- callback: (node) => this.submit(node.fileid),
+ callback: (nodes) => {
+ logger.debug('FileReferencePicker - Nodes picked', { nodes })
+ this.submit(nodes[0].fileid)
+ },
},
],
}
},
methods: {
submit(fileId) {
- const fileLink = window.location.protocol + '//' + window.location.host
- + generateUrl('/f/{fileId}', { fileId })
+ const fileLink = `${window.location.protocol}//${window.location.host}${generateUrl('/f/{fileId}', { fileId })}`
this.$emit('submit', fileLink)
},
},