From f06b3706a6c9c325a5b68713325247f25062d10b Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 4 May 2022 11:39:53 +0200 Subject: [PATCH] Fix public link edit --- changelog/unreleased/bugfix-public-link-edit | 6 ++++++ docker-compose.yml | 1 + .../src/components/SideBar/Shares/FileLinks.vue | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/bugfix-public-link-edit diff --git a/changelog/unreleased/bugfix-public-link-edit b/changelog/unreleased/bugfix-public-link-edit new file mode 100644 index 00000000000..b3e4dbf2546 --- /dev/null +++ b/changelog/unreleased/bugfix-public-link-edit @@ -0,0 +1,6 @@ +Bugfix: Edit public links with expiration + +We've fixed an issue with public links with expiration date that were failing in update requests. + +https://github.com/owncloud/web/issues/6858 +https://github.com/owncloud/web/pull/6867 diff --git a/docker-compose.yml b/docker-compose.yml index 3d723fff125..dd99403b34b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -111,6 +111,7 @@ services: NODE_TLS_REJECT_UNAUTHORIZED: '0' BACKEND_HOST: "https://host.docker.internal:9200" REMOTE_UPLOAD_DIR: "/uploads" + TEST_WITH_GRAPH_API: "true" vnc: build: diff --git a/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue b/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue index 9740c3117cb..b8fc42fd62c 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue @@ -335,7 +335,11 @@ export default defineComponent({ let expireDate = '' if (link.expiration) { - expireDate = DateTime.fromJSDate(link.expiration) + expireDate = ( + typeof link.expiration === 'string' + ? DateTime.fromISO(link.expiration) + : DateTime.fromJSDate(link.expiration) + ) .setLocale(this.$language.current) .endOf('day') .toFormat("yyyy-MM-dd'T'HH:mm:ssZZZ")