From f2cb3afaef62f2dba2a0dc3dc63e374beabcb2df Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 7 May 2020 18:37:49 +0300 Subject: [PATCH] Increase maximum photo size for upload by hash. GitOrigin-RevId: b7dbcaf4710d04b03fc8eaf1d0c1c51ad5224829 --- td/telegram/files/FileManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index a25d5fe86..cf1279c4b 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -3031,7 +3031,7 @@ Result FileManager::get_input_file_id(FileType type, const tl_object_ptr string hash; if (false && new_type == FileType::Photo) { auto r_stat = stat(path); - if (r_stat.is_ok() && r_stat.ok().size_ > 0 && r_stat.ok().size_ < 1000000) { + if (r_stat.is_ok() && r_stat.ok().size_ > 0 && r_stat.ok().size_ < 5000000) { auto r_file_content = read_file_str(path, r_stat.ok().size_); if (r_file_content.is_ok()) { hash = sha256(r_file_content.ok());