forked from organicmaps/organicmaps
Added 100Mb limit for uploading
This commit is contained in:
parent
e64da0aa38
commit
74d4bfcc69
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue