Skip to content

Commit 26aa01e

Browse files
juliusknorrBackportbot
authored andcommitted
Also set X-OC-Mtime header for files that are smaller than 10MB
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent c3dc9b7 commit 26aa01e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/files/js/file-upload.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ OC.FileUpload.prototype = {
242242
// TODO: if fails, it means same id already existed, need to retry
243243
} else {
244244
chunkFolderPromise = $.Deferred().resolve().promise();
245+
var mtime = this.getFile().lastModified;
246+
if (mtime) {
247+
data.headers['X-OC-Mtime'] = mtime / 1000;
248+
}
245249
}
246250

247251
// wait for creation of the required directory before uploading

0 commit comments

Comments
 (0)