Skip to content

Commit

Permalink
fix 2gb+ file uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
kukuruzka165 committed Jul 8, 2024
1 parent 4c6759a commit cf0ea14
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Telegram/SourceFiles/storage/file_upload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ constexpr auto kMaxUploadPerSession = 1024 * 1024;

constexpr auto kDocumentMaxPartsCountDefault = 4000;

// 64kb for tiny document ( < 1mb )
constexpr auto kDocumentUploadPartSize0 = 64 * 1024;
// 32kb for tiny document ( < 1mb )
constexpr auto kDocumentUploadPartSize0 = 32 * 1024;

// 128kb for little document ( <= 32mb )
constexpr auto kDocumentUploadPartSize1 = 128 * 1024;
// 64kb for little document ( <= 32mb )
constexpr auto kDocumentUploadPartSize1 = 64 * 1024;

// 256kb for small document ( <= 375mb )
constexpr auto kDocumentUploadPartSize2 = 256 * 1024;
// 128kb for small document ( <= 375mb )
constexpr auto kDocumentUploadPartSize2 = 128 * 1024;

// 512kb for medium document ( <= 750mb )
constexpr auto kDocumentUploadPartSize3 = 512 * 1024;
// 256kb for medium document ( <= 750mb )
constexpr auto kDocumentUploadPartSize3 = 256 * 1024;

// 1024kb for large document ( <= 1500mb )
constexpr auto kDocumentUploadPartSize4 = 1024 * 1024;
// 512kb for large document ( <= 1500mb )
constexpr auto kDocumentUploadPartSize4 = 512 * 1024;

// How much time without upload causes additional session kill.
constexpr auto kKillSessionTimeout = 15 * crl::time(1000);
Expand Down

0 comments on commit cf0ea14

Please sign in to comment.