Update layer 107.
GitOrigin-RevId: c892d895c8d963e68ad8e3e2bdc9ec6279ea046b
This commit is contained in:
parent
e44b02fe45
commit
db7573769f
@ -1338,7 +1338,7 @@ photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;
|
||||
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;
|
||||
|
||||
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
|
||||
upload.getFile#b15a9afc flags:# precise:flags.0?true location:InputFileLocation offset:int limit:int = upload.File;
|
||||
upload.getFile#b15a9afc flags:# precise:flags.0?true cdn_supported:flags.1?true location:InputFileLocation offset:int limit:int = upload.File;
|
||||
upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;
|
||||
upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile;
|
||||
upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile;
|
||||
|
Binary file not shown.
@ -237,13 +237,19 @@ Result<std::pair<NetQueryPtr, bool>> FileDownloader::start_part(Part part, int32
|
||||
|
||||
NetQueryPtr net_query;
|
||||
if (!use_cdn_) {
|
||||
int32 flags = 0;
|
||||
#if !TD_EMSCRIPTEN
|
||||
// CDN is supported, unless we use domains instead of IPs from a browser
|
||||
flags |= telegram_api::upload_getFile::CDN_SUPPORTED_MASK;
|
||||
#endif
|
||||
DcId dc_id = remote_.is_web() ? G()->get_webfile_dc_id() : remote_.get_dc_id();
|
||||
net_query = G()->net_query_creator().create(
|
||||
UniqueId::next(UniqueId::Type::Default, static_cast<uint8>(QueryType::Default)),
|
||||
remote_.is_web()
|
||||
? create_storer(telegram_api::upload_getWebFile(remote_.as_input_web_file_location(),
|
||||
static_cast<int32>(part.offset), static_cast<int32>(size)))
|
||||
: create_storer(telegram_api::upload_getFile(0, false /*ignored*/, remote_.as_input_file_location(),
|
||||
: create_storer(telegram_api::upload_getFile(flags, false /*ignored*/, false /*ignored*/,
|
||||
remote_.as_input_file_location(),
|
||||
static_cast<int32>(part.offset), static_cast<int32>(size))),
|
||||
dc_id, is_small_ ? NetQuery::Type::DownloadSmall : NetQuery::Type::Download);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user