Sending photo #1250
-
Hi guys! I'm using the latest (6.7.0) version on lib. So what is my question. I'm trynna make a method to send photos. But for some reason i receive mistakes. Can somebody pls explain me how to i create one? Or just give me an example of it. My code:
How do i get fileId:
My mistakes:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
your imagePath seem to be a telegram's fileId, it's not a local file. if your imagePath is a telegram's fileId, your code(InputFile photoFile = new InputFile(new File(imagePath))) should be modified to this:InputFile photoFile = new InputFile(imagePath) |
Beta Was this translation helpful? Give feedback.
your imagePath seem to be a telegram's fileId, it's not a local file. if your imagePath is a telegram's fileId, your code(InputFile photoFile = new InputFile(new File(imagePath))) should be modified to this:InputFile photoFile = new InputFile(imagePath)