Skip to content
Snippets Groups Projects
Commit ec140fa2 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by Vincent Petry
Browse files

Checksums on chunked files

We should also store checksums on chunked files.
We do not checksum individual chunks but only the final file.
parent 3e88a506
Branches
No related tags found
No related merge requests found
......@@ -457,6 +457,14 @@ class File extends Node implements IFile {
$this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED);
if (isset($request->server['HTTP_OC_CHECKSUM'])) {
$checksum = trim($request->server['HTTP_OC_CHECKSUM']);
$this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]);
} else if ($this->getChecksum() !== NULL && $this->getChecksum() !== '') {
$this->fileView->putFileInfo($this->path, ['checksum' => '']);
}
$this->refreshInfo();
$this->emitPostHooks($exists, $targetPath);
$info = $this->fileView->getFileInfo($targetPath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment