From c5e363cb0a4ab585ad30ee447a14711996ba5a85 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Fri, 19 Aug 2022 13:19:45 +0200 Subject: [PATCH] Prevent unnecessary PROPFIND request during upload --- ...gfix-prevent-unnecessary-propfind-during-upload | 6 ++++++ .../src/components/AppBar/CreateAndUpload.vue | 14 +------------- 2 files changed, 7 insertions(+), 13 deletions(-) create mode 100644 changelog/unreleased/bugfix-prevent-unnecessary-propfind-during-upload diff --git a/changelog/unreleased/bugfix-prevent-unnecessary-propfind-during-upload b/changelog/unreleased/bugfix-prevent-unnecessary-propfind-during-upload new file mode 100644 index 00000000000..dcdf3cd4de2 --- /dev/null +++ b/changelog/unreleased/bugfix-prevent-unnecessary-propfind-during-upload @@ -0,0 +1,6 @@ +Bugfix: Prevent unnecessary PROPFIND request during upload + +We've removed the unnecessary PROPFIND request at the start of each upload, increasing upload performance especially in larger folders. + +https://github.com/owncloud/web/issues/7486 +https://github.com/owncloud/web/pull/7488 diff --git a/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue b/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue index dbd3de60d15..04c5cf9f23b 100644 --- a/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue +++ b/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue @@ -345,13 +345,7 @@ export default defineComponent({ } } - let pathFileWasUploadedTo = file.meta.currentFolder - if (file.meta.relativeFolder) { - pathFileWasUploadedTo += file.meta.relativeFolder - } - - const fileIsInCurrentPath = pathFileWasUploadedTo === this.currentPath - + const fileIsInCurrentPath = file.meta.currentFolder === this.currentPath if (fileIsInCurrentPath) { bus.publish('app.files.list.load') } @@ -788,12 +782,6 @@ export default defineComponent({ this.$uppyService.publish('uploadStarted') await this.createDirectoryTree(files) this.$uppyService.publish('addedForUpload', files) - - const reloadRequired = !!files.find((f) => f.meta.currentFolder === this.currentPath) - if (reloadRequired) { - bus.publish('app.files.list.load') - } - this.$uppyService.uploadFiles(files) },