summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CloudFile/src')
-rw-r--r--plugins/CloudFile/src/Services/microsoft_service.cpp10
-rw-r--r--plugins/CloudFile/src/Services/yandex_service.cpp3
2 files changed, 8 insertions, 5 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;
diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp
index 04d63138c0..cef1aadc45 100644
--- a/plugins/CloudFile/src/Services/yandex_service.cpp
+++ b/plugins/CloudFile/src/Services/yandex_service.cpp
@@ -142,7 +142,8 @@ void CYandexService::HandleJsonError(JSONNode &node)
void CYandexService::CreateUploadSession(const char *path, char *uploadUri)
{
ptrA token(db_get_sa(NULL, GetModule(), "TokenSecret"));
- YandexAPI::GetUploadUrlRequest request(token, path);
+ BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::NONE);
+ YandexAPI::GetUploadUrlRequest request(token, path, (OnConflict)strategy);
NLHR_PTR response(request.Send(hConnection));
JSONNode root = GetJsonResponse(response);