Skip to content

Commit

Permalink
Provide full url for chunked upload destination header
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and mgallien committed Oct 11, 2023
1 parent 1012a0b commit 91a4639
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libsync/propagateuploadng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,12 @@ void PropagateUploadFileNG::startNextChunk()
return;
}

auto headers = PropagateUploadFileCommon::headers();
QMap<QByteArray, QByteArray> headers;
headers["OC-Chunk-Offset"] = QByteArray::number(_sent);

const auto destination = QDir::cleanPath(propagator()->account()->davUrl().path() + propagator()->fullRemotePath(_fileToUpload._file));
const auto davUrl = Utility::trailingSlashPath(propagator()->account()->davUrl().toString());
const auto remotePath = Utility::noLeadingSlashPath(propagator()->fullRemotePath(_fileToUpload._file));
const auto destination = QString(davUrl + remotePath);
headers["Destination"] = destination.toUtf8();

_sent += _currentChunkSize;
Expand Down

0 comments on commit 91a4639

Please sign in to comment.