ilbertt / infinitecloud_bot

Infinite Cloud bot source code
https://t.me/infinitecloud_bot
MIT License
10 stars 6 forks source link

Fixed bug when uploading file more than 20mb #3

Closed elephantchau closed 2 years ago

elephantchau commented 2 years ago

API call for telegram.getFile(fileId) will fail when uploading file more than 20mb. Replaced with simple split function to get file extension

elephantchau commented 2 years ago

Code tested with document type file uploads. Original code will fail when file size is more than 20mb.

ilbertt commented 2 years ago

@elephantchau thanks for the PR and sorry for the late reply! Your fix makes totally sense, I've added a comment to change variable declaration from let to const just for best practices purposes. If you could fix it, I'll be really happy to merge your PR! And, if you'd like to reply, I have some questions just for curiosity:

elephantchau commented 2 years ago

@Luca8991 Thanks for the code review! I'm glad I'm able to have some contribution on your project!