summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/File.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index 2d019b46b6a..3ce305d75f3 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -303,6 +303,19 @@ class File extends Node implements IFile {
}
}
+ $fileInfoUpdate = [
+ 'upload_time' => time()
+ ];
+
+ // allow sync clients to send the creation time along in a header
+ if (isset($this->request->server['HTTP_X_OC_CTIME'])) {
+ $ctime = $this->sanitizeMtime($this->request->server['HTTP_X_OC_CTIME']);
+ $fileInfoUpdate['creation_time'] = $ctime;
+ $this->header('X-OC-CTime: accepted');
+ }
+
+ $this->fileView->putFileInfo($this->path, $fileInfoUpdate);
+
if ($view) {
$this->emitPostHooks($exists);
}