Merge pull request #17858 from nextcloud/backport/17847/stable17

[stable17] Also set X-OC-Mtime header for files that are smaller than 10MB
This commit is contained in:
Roeland Jago Douma 2019-11-12 08:11:22 +01:00 committed by GitHub
commit 351b76f97e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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