Skip to content

Commit 15c90c2

Browse files
mgallienbackportbot[bot]
authored andcommitted
provide LOCK token when uploading a single file via PUT
for simple webDAV upload via PUT verb, provide the needed lock token Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
1 parent dbbd49a commit 15c90c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libsync/propagateuploadv1.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ void PropagateUploadFileV1::startNextChunk()
102102

103103
QString path = _fileToUpload._file;
104104

105+
if (_item->_locked == SyncFileItem::LockStatus::LockedItem) {
106+
headers[QByteArrayLiteral("If")] = (QLatin1String("<") + propagator()->account()->davUrl().toString() + _fileToUpload._file + "> (<opaquelocktoken:" + _item->_lockToken.toUtf8() + ">)").toUtf8();
107+
}
108+
105109
qint64 chunkStart = 0;
106110
qint64 currentChunkSize = fileSize;
107111
bool isFinalChunk = false;

0 commit comments

Comments
 (0)