Fix Chunk v2 upload headers

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-09-22 16:45:20 +08:00
parent 395edd95b2
commit a045dd71ae
No known key found for this signature in database
GPG Key ID: C839200C384636B0

View File

@ -360,11 +360,11 @@ void PropagateUploadFileNG::startNextChunk()
return;
}
QMap<QByteArray, QByteArray> headers;
auto headers = PropagateUploadFileCommon::headers();
headers["OC-Chunk-Offset"] = QByteArray::number(_sent);
const auto destination = QDir::cleanPath(propagator()->account()->davUrl().path() + propagator()->fullRemotePath(_fileToUpload._file));
headers["Destination"] = QUrl::toPercentEncoding(destination);
headers["Destination"] = destination.toUtf8();
_sent += _currentChunkSize;
const auto url = chunkUrl(_currentChunk);