diff options
Diffstat (limited to 'plugins/CloudFile/src/Services/microsoft_service.cpp')
-rw-r--r-- | plugins/CloudFile/src/Services/microsoft_service.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp index af4dd6f703..aa2b8613b4 100644 --- a/plugins/CloudFile/src/Services/microsoft_service.cpp +++ b/plugins/CloudFile/src/Services/microsoft_service.cpp @@ -130,9 +130,10 @@ void COneDriveService::HandleJsonError(JSONNode &node) void COneDriveService::UploadFile(const char *parentId, const char *name, const char *data, size_t size, char *fileId) { ptrA token(db_get_sa(NULL, GetModule(), "TokenSecret")); + BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::NONE); OneDriveAPI::UploadFileRequest *request = mir_strlen(parentId) - ? new OneDriveAPI::UploadFileRequest(token, parentId, name, data, size) - : new OneDriveAPI::UploadFileRequest(token, name, data, size); + ? new OneDriveAPI::UploadFileRequest(token, parentId, name, data, size, (OnConflict)strategy) + : new OneDriveAPI::UploadFileRequest(token, name, data, size, (OnConflict)strategy); NLHR_PTR response(request->Send(hConnection)); delete request; @@ -144,9 +145,10 @@ void COneDriveService::UploadFile(const char *parentId, const char *name, const void COneDriveService::CreateUploadSession(const char *parentId, const char *name, char *uploadUri) { ptrA token(db_get_sa(NULL, GetModule(), "TokenSecret")); + BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::NONE); OneDriveAPI::CreateUploadSessionRequest *request = mir_strlen(parentId) - ? new OneDriveAPI::CreateUploadSessionRequest(token, parentId, name) - : new OneDriveAPI::CreateUploadSessionRequest(token, name); + ? new OneDriveAPI::CreateUploadSessionRequest(token, parentId, name, (OnConflict)strategy) + : new OneDriveAPI::CreateUploadSessionRequest(token, name, (OnConflict)strategy); NLHR_PTR response(request->Send(hConnection)); delete request; |