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)