From 26aa01e1613227bc4401a931244166bbb757d7af 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 8db23fca3b..c7174d3184 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