Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(share): Send empty expireDate when not expireDate set
When creating a new share, if the user unchecks "Set expiry date"

no `expireDate` is sent to the server.

However, the server then assumes the default configured, hence better

to send an empty value.

Signed-off-by: fenn-cs <[email protected]>

[skip ci]
  • Loading branch information
nfebe committed Apr 16, 2024
commit 713f2667c13326e25a57d9927eee873d51be033e
6 changes: 2 additions & 4 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,7 @@ export default {
fileInfo: this.fileInfo,
}

if (this.hasExpirationDate) {
incomingShare.expireDate = this.share.expireDate
}
incomingShare.expireDate = this.hasExpirationDate ? this.share.expireDate : ''

if (this.isPasswordProtected) {
incomingShare.password = this.share.password
Expand Down Expand Up @@ -857,9 +855,9 @@ export default {
shareWith: share.shareWith,
permissions: share.permissions,
attributes: JSON.stringify(fileInfo.shareAttributes),
expireDate: share.expireDate,
...(share.note ? { note: share.note } : {}),
...(share.password ? { password: share.password } : {}),
...(share.expireDate ? { expireDate: share.expireDate } : {}),
})
return resultingShare
} catch (error) {
Expand Down