summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-12 08:11:22 +0100
committerGitHub <noreply@github.com>2019-11-12 08:11:22 +0100
commit351b76f97e4779773579e6a40ad71fc34ac73735 (patch)
tree0b9d66c33504ee942073533553cc13b075161002
parentf6469c04d93f529daabe981d88ee7a5249420b8e (diff)
parent14d5856f841454de9453afca8612e90a66351ffb (diff)
downloadnextcloud-server-351b76f97e4779773579e6a40ad71fc34ac73735.tar.gz
nextcloud-server-351b76f97e4779773579e6a40ad71fc34ac73735.zip
Merge pull request #17858 from nextcloud/backport/17847/stable17
[stable17] Also set X-OC-Mtime header for files that are smaller than 10MB
-rw-r--r--apps/files/js/file-upload.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 8db23fca3b5..c7174d31848 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