CLOUD: Update GoogleDriveStorage
It now derives from IdStorage, so lots of GoogleDrive*Request classes are removed and replaced with generic IdStorage*Request ones.
This commit is contained in:
parent
5cbb3e8705
commit
0b5bd18d85
14 changed files with 19 additions and 1005 deletions
|
@ -198,11 +198,15 @@ void GoogleDriveUploadRequest::uploadNextPart() {
|
|||
|
||||
byte *buffer = new byte[UPLOAD_PER_ONE_REQUEST];
|
||||
uint32 size = _contentsStream->read(buffer, UPLOAD_PER_ONE_REQUEST);
|
||||
request->setBuffer(buffer, size);
|
||||
if (size != 0) request->setBuffer(buffer, size);
|
||||
|
||||
//request->addHeader(Common::String::format("Content-Length: %u", size));
|
||||
if (_uploadUrl != "")
|
||||
request->addHeader(Common::String::format("Content-Range: bytes %u-%u/%u", oldPos, _contentsStream->pos()-1, _contentsStream->size())); ;
|
||||
if (_uploadUrl != "") {
|
||||
if (_contentsStream->pos() == 0)
|
||||
request->addHeader(Common::String::format("Content-Length: 0"));
|
||||
else
|
||||
request->addHeader(Common::String::format("Content-Range: bytes %u-%u/%u", oldPos, _contentsStream->pos() - 1, _contentsStream->size()));
|
||||
}
|
||||
|
||||
_workingRequest = ConnMan.addRequest(request);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue