diff options
author | yemkareems <yemkareems@gmail.com> | 2025-03-05 09:30:02 +0530 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-03-18 16:00:54 +0100 |
commit | 92a93393e1ea4da9ab2b4edaf745517ff5f2fbbc (patch) | |
tree | 1a2b504156d934059745910506bcdc5ee313bfd0 /apps | |
parent | 8035c8d6b80e81facea6fba362664014acbcf525 (diff) | |
download | nextcloud-server-92a93393e1ea4da9ab2b4edaf745517ff5f2fbbc.tar.gz nextcloud-server-92a93393e1ea4da9ab2b4edaf745517ff5f2fbbc.zip |
fix: pass hide download attribute while creating the share to fix github issue 50788
Signed-off-by: yemkareems <yemkareems@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/mixins/SharesMixin.js | 4 | ||||
-rw-r--r-- | 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 c809b650fdf..41fb1185b9d 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 ed7d324046c..ea2e9e73c06 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -1008,12 +1008,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) |