diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 7a9f4f6f2cfc..5f54a95c96aa 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -51,7 +51,7 @@ namespace td { namespace { -constexpr int64 MAX_FILE_SIZE = 1500 * (1 << 20) /* 1500MB */; +constexpr int64 MAX_FILE_SIZE = 2000 * (1 << 20) /* 2000MB */; } // namespace int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(INFO); diff --git a/td/telegram/files/PartsManager.cpp b/td/telegram/files/PartsManager.cpp index 8e19f6260a9e..7c8f26441cee 100644 --- a/td/telegram/files/PartsManager.cpp +++ b/td/telegram/files/PartsManager.cpp @@ -15,7 +15,6 @@ #include namespace td { -/*** PartsManager ***/ namespace { int64 calc_part_count(int64 size, int64 part_size) { diff --git a/td/telegram/files/PartsManager.h b/td/telegram/files/PartsManager.h index 2f88265a70c0..ebd80a67cd31 100644 --- a/td/telegram/files/PartsManager.h +++ b/td/telegram/files/PartsManager.h @@ -13,7 +13,6 @@ namespace td { -/*** PartsManager***/ struct Part { int id; int64 offset; @@ -54,9 +53,9 @@ class PartsManager { string get_bitmask(); private: - static constexpr int MAX_PART_COUNT = 3000; - static constexpr int MAX_PART_SIZE = 512 * (1 << 10); - static constexpr int64 MAX_FILE_SIZE = MAX_PART_SIZE * MAX_PART_COUNT; + static constexpr int MAX_PART_COUNT = 4000; + static constexpr size_t MAX_PART_SIZE = 512 * (1 << 10); + static constexpr int64 MAX_FILE_SIZE = static_cast(MAX_PART_SIZE) * MAX_PART_COUNT; enum class PartStatus : int32 { Empty, Pending, Ready }; diff --git a/tdnet/td/net/HttpReader.h b/tdnet/td/net/HttpReader.h index 26fc5ec66448..fdb32c0b1681 100644 --- a/tdnet/td/net/HttpReader.h +++ b/tdnet/td/net/HttpReader.h @@ -105,7 +105,7 @@ class HttpReader { static constexpr size_t MAX_TOTAL_PARAMETERS_LENGTH = 1 << 16; // Some reasonable limit static constexpr size_t MAX_TOTAL_HEADERS_LENGTH = 1 << 18; // Some reasonable limit static constexpr size_t MAX_BOUNDARY_LENGTH = 70; // As defined by RFC1341 - static constexpr int64 MAX_FILE_SIZE = 1500 << 20; // Telegram server file size limit + static constexpr int64 MAX_FILE_SIZE = 2000 << 20; // Telegram server file size limit static constexpr const char TEMP_DIRECTORY_PREFIX[] = "tdlib-server-tmp"; };