mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix(files_sharing): adjust NewFileRequestDialog for emails invites
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
75ca4944c9
commit
06462804f7
1 changed files with 14 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue