xooniverse / televerse

Your gateway to seamless Telegram Bot Development 💙
https://televerse.xooniverse.com
BSD 3-Clause "New" or "Revised" License
64 stars 11 forks source link

Suggestion: Add `InputFile.fromBytes` #138

Closed doiraduc closed 1 year ago

doiraduc commented 1 year ago

Currently, files can be uploaded by File, fileId or url. I think uploading a file by bytes (Uint8List) should also be included as a shortcut, because getting a file via http returns bodyBytes, and in the current implementation I have to set up a temporary folder, then save that file on the disk, only for it to be processed right after saving and then deleted. It seems counterintuitive in this scenario.

HeySreelal commented 1 year ago

Perfect, that'll be great as well. Will add it to the next release. Thanks for shooting this.