diff options
author | aunsane <aunsane@gmail.com> | 2017-05-10 00:38:42 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-05-10 00:38:42 +0300 |
commit | 6cb4fe7726c5672a5b6776d83976ed851d8332c2 (patch) | |
tree | b7464f6d6105d70708d08ddb6d9b5524c3b22832 /plugins/CloudFile/src/Services/yandex_service.cpp | |
parent | e6b569f5f636c548fa253171f86b7a0f96fe1817 (diff) |
CloudFile: fix "on conflict" fox dropbox
Diffstat (limited to 'plugins/CloudFile/src/Services/yandex_service.cpp')
-rw-r--r-- | plugins/CloudFile/src/Services/yandex_service.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp index cef1aadc45..d012dd3cc8 100644 --- a/plugins/CloudFile/src/Services/yandex_service.cpp +++ b/plugins/CloudFile/src/Services/yandex_service.cpp @@ -142,7 +142,7 @@ void CYandexService::HandleJsonError(JSONNode &node) void CYandexService::CreateUploadSession(const char *path, char *uploadUri) { ptrA token(db_get_sa(NULL, GetModule(), "TokenSecret")); - BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::NONE); + BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::REPLACE); YandexAPI::GetUploadUrlRequest request(token, path, (OnConflict)strategy); NLHR_PTR response(request.Send(hConnection)); @@ -247,8 +247,11 @@ UINT CYandexService::Upload(FileTransferParam *ftp) size_t size = ftp->ReadCurrentFile(chunk, chunkSize); UploadFile(uploadUri, chunk, size); + + ftp->Progress(size); } - else { + else + { uint64_t offset = 0; double chunkCount = ceil(double(fileSize) / chunkSize); while (chunkCount > 0) { |