I'm well aware this question seems like a possible duplicate (e.g., 1, 2, 3), but I couldn't find a straight answer to my scenario anywhere. The exact flow is as follows:
- The Bot receives a message with a photo from a user. It then extracts and stores the
file_id
of the highest-quality photo out of themessage.photo
array (the last array item). - The bot fires a
getFile(file_id)
request using the storedfile_id
, which returns a single link (NOT an array) that points to a low-quality file (slightly bigger than a thumbnail).
To summarize:
- Using the exact
file_id
withgetFile()
returns a link to a low-quality file. - Using the exact
file_id
withsendPhoto()
will send a full-size photo.
On the chance I'm missing something here, can anyone confirm that that's expected behavior? Thanks.