Skip to content

Commit a2c2389

Browse files
authored
Merge pull request #17857 from nextcloud/backport/17847/stable16
[stable16] Also set X-OC-Mtime header for files that are smaller than 10MB
2 parents fe78fe9 + 26aa01e commit a2c2389

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)