diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-07 20:16:00 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-11-07 20:16:00 +0100 |
commit | dbd9622bc3ec6e67e8ae04f574517e6ee1ec4ca5 (patch) | |
tree | 44b64caf71e98a2d1c4a63bf3acf3d212a57b592 /apps/files/js | |
parent | 9fe4b953e98a067b77ccf10f848b97724ac82c0a (diff) | |
download | nextcloud-server-dbd9622bc3ec6e67e8ae04f574517e6ee1ec4ca5.tar.gz nextcloud-server-dbd9622bc3ec6e67e8ae04f574517e6ee1ec4ca5.zip |
Also set X-OC-Mtime header for files that are smaller than 10MB
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/file-upload.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index c63c1e31522..b987fa4e42b 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 |