diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-12-22 00:44:38 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-01-16 11:28:05 +0100 |
commit | 0da2ea61cc0aaacff3806541745b0f583317b6de (patch) | |
tree | 86e94ec2e8a8beac7308272c50a0f06470477c29 /apps | |
parent | 15b14378824b53dbfd9358d082a12dccfd314d76 (diff) | |
download | nextcloud-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.vue | 10 |
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) }, }, |