Closed Psychevus closed 8 years ago
Take photo
from message and execute GetFile
request.
I create instance from GetFile(file_id)
. but I cant still figure that out. how to get a file from getFile
?
GetFile getFile = new GetFile(message.photo()[0].fileId());
GetFileResponse response = bot.execute(getFile);
File file = response.file;
If u want to get full path of file to download, use:
String urlPath = bot.getFullFilePath(file)
Thank you @pengrad :+1: :)
How can I download image via this java-telegram-bot-api? I got a response that contains Message model. now I want to get to the Image file, how can I do this?