Shrinavat 16 Posted March 22, 2022 Hello, I know there are advanced Clever Internet Suite users here who might be able to help me with advice. To send an image to a Telegram channel, I use the following code: const urlTGSendPhoto = 'https://api.telegram.org/bot%s/sendPhoto'; BOT_API_KEY = 'xxxxxxxxxxxxxx'; CHANNEL_NAME = 'xxxxxxxxxxxxxx'; ... clHttpRequest.AddFormField('chat_id', CHANNEL_NAME); clHttpRequest.AddSubmitFile('photo', 'chart.png'); var s := clHttpTG.Post(Format(urlTGSendPhoto, [BOT_API_KEY]), clHttpRequest); where 'chart.png' is the name of the image file on disk. It works great. Can someone please tell me how to use a stream (TMemoryStream/TFileStream) or TPngImage/TJPEGImage/TBitmap instead of a file (that is, without the need to save the file to disk)? Share this post Link to post
Shrinavat 16 Posted April 14, 2022 Thanks to the author of the library we were able to find a solution: https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/SendTelegramPhoto Share this post Link to post