Can't get content from method upload.getFile using inputPhotoFileLocation, getting exeption FILE_REFERENCE_EXPIRED, Tried everything I got from the internet. using MTProto client on js
await TelegramAPI.call("upload.getFile", {
location: {
_: "inputPhotoFileLocation",
id: Image[0].media.photo.id,
access_hash: Image[0].media.photo.access_hash,
file_reference: Image[0].media.photo.file_reference,
thumb_size: Image[0].media.photo.sizes.find(
(size: any) => size._ == "photoSizeProgressive"
).type,
},
offset: 0,
limit: 1024 * 1024,
})
I just want to get image data from the saved messages.
this did the trick for me