-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support uploading multiple files in a single request #354
Comments
Hello! Edit: If you think this is ok, tell me and I try to update the api with this approach and open a pull request. |
Hi @HirbodBehnam, thank you for the code sample! That seems like a great strategy for doing multiple uploads. However, because it involved a rather large internal change to get it into a good condition, I implemented it myself. I left a comment crediting you for your contribution though, I hope that's okay. Lines 155 to 221 in ce4fc98
|
Hello again |
Certain methods (sendMediaGroup, editMessageMedia, anything that supports thumbnails) allow uploading multiple files. Currently,
UploadFile
is structured in such a way it can only accept a single file to upload:telegram-bot-api/bot.go
Lines 151 to 159 in da98517
Therefore, there needs to be a change to support uploading multiple files. One blocking issue is that the underlying library used to send files without reading everything into memory, multipartstreamer, only accepts one file per request. A replacement would have to be created.
I would love to get feedback on the best way to implement this.
The text was updated successfully, but these errors were encountered: