Also set X-OC-Mtime header for files that are smaller than 10MB

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-11-07 20:16:00 +01:00
parent 9fe4b953e9
commit dbd9622bc3
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 4 additions and 0 deletions

View File

@ -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