From dbd9622bc3ec6e67e8ae04f574517e6ee1ec4ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 7 Nov 2019 20:16:00 +0100 Subject: [PATCH] Also set X-OC-Mtime header for files that are smaller than 10MB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/file-upload.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index c63c1e3152..b987fa4e42 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -242,6 +242,10 @@ OC.FileUpload.prototype = { // TODO: if fails, it means same id already existed, need to retry } else { chunkFolderPromise = $.Deferred().resolve().promise(); + var mtime = this.getFile().lastModified; + if (mtime) { + data.headers['X-OC-Mtime'] = mtime / 1000; + } } // wait for creation of the required directory before uploading