Added 100Mb limit for uploading

This commit is contained in:
r.kuznetsov 2018-02-13 14:54:13 +03:00 committed by Daria Volvenkova
parent e64da0aa38
commit 74d4bfcc69

View file

@ -32,6 +32,7 @@ uint32_t constexpr kRetryTimeoutInSeconds = 5;
uint32_t constexpr kRetryDegradationFactor = 2;
uint64_t constexpr kMaxWwanUploadingSizeInBytes = 10 * 1024; // 10Kb
uint64_t constexpr kMaxUploadingFileSizeInBytes = 100 * 1024 * 1024; // 100Mb
std::string const kServerUrl = CLOUD_URL;
std::string const kCloudServerVersion = "v1";
@ -262,6 +263,10 @@ void Cloud::MarkModifiedImpl(std::string const & filePath, bool checkSize)
if (!my::GetFileSize(filePath, fileSize))
return;
// We do not work with files which size is more than kMaxUploadingFileSizeInBytes.
if (fileSize > kMaxUploadingFileSizeInBytes)
return;
auto entryPtr = GetEntryImpl(filePath);
if (entryPtr)
{