mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
if a file is locked/ provide token during upload
will add needed lock token in final move headers for chunk upload Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
27d8ecbf44
commit
dbbd49ac47
1 changed files with 3 additions and 0 deletions
|
@ -328,6 +328,9 @@ void PropagateUploadFileNG::finishUpload()
|
|||
|
||||
const auto fileSize = _fileToUpload._size;
|
||||
headers[QByteArrayLiteral("OC-Total-Length")] = QByteArray::number(fileSize);
|
||||
if (_item->_locked == SyncFileItem::LockStatus::LockedItem) {
|
||||
headers[QByteArrayLiteral("If")] = (QLatin1String("<") + propagator()->account()->davUrl().toString() + _fileToUpload._file + "> (<opaquelocktoken:" + _item->_lockToken.toUtf8() + ">)").toUtf8();
|
||||
}
|
||||
|
||||
const auto job = new MoveJob(propagator()->account(), Utility::concatUrlPath(chunkUploadFolderUrl(), "/.file"), destination, headers, this);
|
||||
_jobs.append(job);
|
||||
|
|
Loading…
Reference in a new issue