diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-07-05 15:18:28 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-07-12 20:14:30 +0200 |
commit | 06462804f7f8b2c046aa3875d8780fb4e4f4d9fc (patch) | |
tree | 9712d5ef0dbbea898672e456048c7864be974d8d /apps | |
parent | 75ca4944c9e9a1b20bdb1e01f5acf59f2c77afe2 (diff) | |
download | nextcloud-server-06462804f7f8b2c046aa3875d8780fb4e4f4d9fc.tar.gz nextcloud-server-06462804f7f8b2c046aa3875d8780fb4e4f4d9fc.zip |
fix(files_sharing): adjust NewFileRequestDialog for emails invites
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/components/NewFileRequestDialog.vue | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/NewFileRequestDialog.vue b/apps/files_sharing/src/components/NewFileRequestDialog.vue index 7db7c75313f..50e3ff485c9 100644 --- a/apps/files_sharing/src/components/NewFileRequestDialog.vue +++ b/apps/files_sharing/src/components/NewFileRequestDialog.vue @@ -238,18 +238,28 @@ export default defineComponent({ async createShare() { this.loading = true - const shareUrl = generateOcsUrl('apps/files_sharing/api/v1/shares') // Format must be YYYY-MM-DD const expireDate = this.deadline ? this.deadline.toISOString().split('T')[0] : undefined + const shareUrl = generateOcsUrl('apps/files_sharing/api/v1/shares') try { const request = await axios.post(shareUrl, { - path: this.destination, shareType: Type.SHARE_TYPE_EMAIL, publicUpload: 'true', + + label: this.label, + path: this.destination, + note: this.note, + password: this.password || undefined, expireDate, - label: this.label, - attributes: JSON.stringify({ is_file_request: true }) + + // Empty string to fallback to the attributes + sharedWith: '', + attributes: JSON.stringify({ + value: this.emails, + key: 'emails', + scope: 'sharedWith', + }) }) // If not an ocs request |