aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/cloud/dropbox/dropboxuploadrequest.cpp4
-rw-r--r--backends/cloud/onedrive/onedriveuploadrequest.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/backends/cloud/dropbox/dropboxuploadrequest.cpp b/backends/cloud/dropbox/dropboxuploadrequest.cpp
index 5765892a70..f1fb818d36 100644
--- a/backends/cloud/dropbox/dropboxuploadrequest.cpp
+++ b/backends/cloud/dropbox/dropboxuploadrequest.cpp
@@ -69,7 +69,7 @@ void DropboxUploadRequest::uploadNextPart() {
Common::JSONObject jsonRequestParameters;
if (_contentsStream->pos() == 0 || _sessionId == "") {
- if (_contentsStream->size() <= UPLOAD_PER_ONE_REQUEST) {
+ if ((uint32)_contentsStream->size() <= UPLOAD_PER_ONE_REQUEST) {
url = "https://content.dropboxapi.com/2/files/upload";
jsonRequestParameters.setVal("path", new Common::JSONValue(_savePath));
jsonRequestParameters.setVal("mode", new Common::JSONValue("overwrite"));
@@ -80,7 +80,7 @@ void DropboxUploadRequest::uploadNextPart() {
jsonRequestParameters.setVal("close", new Common::JSONValue(false));
}
} else {
- if (_contentsStream->size() - _contentsStream->pos() <= UPLOAD_PER_ONE_REQUEST) {
+ if ((uint32)(_contentsStream->size() - _contentsStream->pos()) <= UPLOAD_PER_ONE_REQUEST) {
url += "finish";
Common::JSONObject jsonCursor, jsonCommit;
jsonCursor.setVal("session_id", new Common::JSONValue(_sessionId));
diff --git a/backends/cloud/onedrive/onedriveuploadrequest.cpp b/backends/cloud/onedrive/onedriveuploadrequest.cpp
index bc54a811a9..08f45935d2 100644
--- a/backends/cloud/onedrive/onedriveuploadrequest.cpp
+++ b/backends/cloud/onedrive/onedriveuploadrequest.cpp
@@ -62,7 +62,7 @@ void OneDriveUploadRequest::start() {
void OneDriveUploadRequest::uploadNextPart() {
const uint32 UPLOAD_PER_ONE_REQUEST = 10 * 1024 * 1024;
- if (_uploadUrl == "" && _contentsStream->size() > UPLOAD_PER_ONE_REQUEST) {
+ if (_uploadUrl == "" && (uint32)_contentsStream->size() > UPLOAD_PER_ONE_REQUEST) {
Common::String url = "https://api.onedrive.com/v1.0/drive/special/approot:/"+ConnMan.urlEncode(_savePath)+":/upload.createSession"; //folder must exist
Networking::JsonCallback callback = new Common::Callback<OneDriveUploadRequest, Networking::JsonResponse>(this, &OneDriveUploadRequest::partUploadedCallback);
Networking::ErrorCallback failureCallback = new Common::Callback<OneDriveUploadRequest, Networking::ErrorResponse>(this, &OneDriveUploadRequest::partUploadedErrorCallback);