Hi, I have a byte array with content and would like to send it as a file without saving it anywhere on a file system. Could you please provide an example of how to do it?
Thank you in advance.
This com/elbekD/bot/http/TelegramClient.kt:128 sender always sets the filename as "content" when trying to send ByteArray. This is unacceptable because I can't specify the file extension and let the user open it.
when (file) {
is ByteArray -> form.addFormDataPart(type, "content", RequestBody.create(null, file))
Hi, I have a byte array with content and would like to send it as a file without saving it anywhere on a file system. Could you please provide an example of how to do it? Thank you in advance.
This
com/elbekD/bot/http/TelegramClient.kt:128
sender always sets the filename as "content" when trying to send ByteArray. This is unacceptable because I can't specify the file extension and let the user open it.Why not to implement according to https://core.telegram.org/bots/api#inputfile?