From 662de917abb666b684322099bc6e6118446c374f Mon Sep 17 00:00:00 2001 From: yemkareems Date: Wed, 5 Mar 2025 09:30:02 +0530 Subject: [PATCH] fix: pass hide download attribute while creating the share to fix github issue 50788 Signed-off-by: yemkareems --- apps/files_sharing/src/mixins/SharesMixin.js | 4 +++- apps/files_sharing/src/views/SharingDetailsTab.vue | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index a18f35378c3..e702ef5f5fd 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -278,7 +278,9 @@ export default { // force value to string because that is what our // share api controller accepts propertyNames.forEach(name => { - if ((typeof this.share[name]) === 'object') { + if (this.share[name] === null || this.share[name] === undefined) { + properties[name] = '' + } else if ((typeof this.share[name]) === 'object') { properties[name] = JSON.stringify(this.share[name]) } else { properties[name] = this.share[name].toString() diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 5d0e5e38d42..f2a5a012321 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -916,12 +916,13 @@ export default { this.creating = false this.share = share this.$emit('add:share', this.share) - } else { - this.$emit('update:share', this.share) - emit('update:share', this.share) - this.queueUpdate(...permissionsAndAttributes) } + // Let's update after creation as some attrs are only available after creation + this.$emit('update:share', this.share) + emit('update:share', this.share) + this.queueUpdate(...permissionsAndAttributes) + await this.getNode() emit('files:node:updated', this.node)