Increase maximum file size.
GitOrigin-RevId: d4da965e7ecea03bc3eb356c41a81a715a06ace0
This commit is contained in:
parent
c4113c6be3
commit
2ac8c164ff
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
namespace {
|
namespace {
|
||||||
constexpr int64 MAX_FILE_SIZE = 1500 * (1 << 20) /* 1500MB */;
|
constexpr int64 MAX_FILE_SIZE = 2000 * (1 << 20) /* 2000MB */;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(INFO);
|
int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(INFO);
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
/*** PartsManager ***/
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
int64 calc_part_count(int64 size, int64 part_size) {
|
int64 calc_part_count(int64 size, int64 part_size) {
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
/*** PartsManager***/
|
|
||||||
struct Part {
|
struct Part {
|
||||||
int id;
|
int id;
|
||||||
int64 offset;
|
int64 offset;
|
||||||
@ -54,9 +53,9 @@ class PartsManager {
|
|||||||
string get_bitmask();
|
string get_bitmask();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr int MAX_PART_COUNT = 3000;
|
static constexpr int MAX_PART_COUNT = 4000;
|
||||||
static constexpr int MAX_PART_SIZE = 512 * (1 << 10);
|
static constexpr size_t MAX_PART_SIZE = 512 * (1 << 10);
|
||||||
static constexpr int64 MAX_FILE_SIZE = MAX_PART_SIZE * MAX_PART_COUNT;
|
static constexpr int64 MAX_FILE_SIZE = static_cast<int64>(MAX_PART_SIZE) * MAX_PART_COUNT;
|
||||||
|
|
||||||
enum class PartStatus : int32 { Empty, Pending, Ready };
|
enum class PartStatus : int32 { Empty, Pending, Ready };
|
||||||
|
|
||||||
|
@ -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_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_TOTAL_HEADERS_LENGTH = 1 << 18; // Some reasonable limit
|
||||||
static constexpr size_t MAX_BOUNDARY_LENGTH = 70; // As defined by RFC1341
|
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";
|
static constexpr const char TEMP_DIRECTORY_PREFIX[] = "tdlib-server-tmp";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user