Open exilibriss opened 2 years ago
Solution:
let buf = message.media.photo.file_reference; Buffer.from(buf.toString('hex'), 'hex')
{ location: { _: 'inputPhotoFileLocation', id: 'photo_id_from_photo_object', access_hash: 'access_hash_from_photo_object', file_reference: buf, // <-- recompiled buffer here thumb_size: 'y' }, offset: 0, limit: 1024 * 1024 // <-- maximum value for limit }
Hope this solution helps someone.
Dudes, i have a problem:
When i use method upload.getFile with constructor inputPhotoFileLocation, call return nothing w/o exception or error and cpu load about 100% for pending promise.
e.g. params of method call:
Can u help me w/ download photo by using new API constructor - inputPhotoFileLocation ?