Checksums on chunked files
We should also store checksums on chunked files. We do not checksum individual chunks but only the final file.
This commit is contained in:
parent
3e88a5067f
commit
ec140fa2ec
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue