diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2019-11-08 08:42:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-08 08:42:35 +0100 |
commit | 4813c8760906361dbadcb5b57fcc1639976ab2d9 (patch) | |
tree | 6db8f775f9dfe0959800107a090c6e02d9527c09 | |
parent | e9fb725b9e85daeb9a179f9cbfb8af071cffe716 (diff) | |
parent | dbd9622bc3ec6e67e8ae04f574517e6ee1ec4ca5 (diff) | |
download | nextcloud-server-4813c8760906361dbadcb5b57fcc1639976ab2d9.tar.gz nextcloud-server-4813c8760906361dbadcb5b57fcc1639976ab2d9.zip |
Also set X-OC-Mtime header for files that are smaller than 10MB (#17847)
Also set X-OC-Mtime header for files that are smaller than 10MB
-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 |