]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also set X-OC-Mtime header for files that are smaller than 10MB 17857/head
authorJulius Härtl <jus@bitgrid.net>
Thu, 7 Nov 2019 19:16:00 +0000 (20:16 +0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Fri, 8 Nov 2019 09:23:56 +0000 (09:23 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/file-upload.js

index 8db23fca3b5e983d002525bbd60f753d306c342d..c7174d318489b4bd8617e107d35997e4b0134c34 100644 (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