diff --git a/changelog/unreleased/bugfix-do-not-load-from-cache b/changelog/unreleased/bugfix-do-not-load-from-cache new file mode 100644 index 00000000000..06f1d4c4ab3 --- /dev/null +++ b/changelog/unreleased/bugfix-do-not-load-from-cache @@ -0,0 +1,6 @@ +Bugfix: Do not load files from cache + +When apps (i.e Drawio) try to load a file, the browser caches the request. +If the file was modified somewhere else, this causes inconsistent results which prevent saving any changes until the cache is properly cleared. + +https://github.com/owncloud/web/pull/6447 diff --git a/packages/web-app-draw-io/src/App.vue b/packages/web-app-draw-io/src/App.vue index 73d1152f0e2..77d62ef31d3 100644 --- a/packages/web-app-draw-io/src/App.vue +++ b/packages/web-app-draw-io/src/App.vue @@ -137,7 +137,7 @@ export default { }) }, load() { - this.getFileContents(this.filePath, { resolveWithResponseObject: true }) + this.getFileContents(this.filePath) .then((resp) => { this.currentETag = resp.headers.ETag this.$refs.drawIoEditor.contentWindow.postMessage( diff --git a/packages/web-pkg/src/composables/appDefaults/useAppFileHandling.ts b/packages/web-pkg/src/composables/appDefaults/useAppFileHandling.ts index 515c6163b43..3433fc16d4f 100644 --- a/packages/web-pkg/src/composables/appDefaults/useAppFileHandling.ts +++ b/packages/web-pkg/src/composables/appDefaults/useAppFileHandling.ts @@ -70,7 +70,8 @@ export function useAppFileHandling(options: AppFileHandlingOptions): AppFileHand } } else { return client.files.getFileContents(filePath, { - resolveWithResponseObject: true + resolveWithResponseObject: true, + noCache: true }) } }