Veetaha / snowpity

Apache License 2.0
6 stars 1 forks source link

Optimize feching and uploading media to telegram #27

Open Veetaha opened 1 year ago

Veetaha commented 1 year ago

Right now the biggest problem we have is that some media hosting platforms don't provide exact files sizes in their API. So we can only heuristically estimate an approximate maximum size of the file (in case of derpibooru), or just know the exact upper limit of how much a file can weight (in case of twitter).

It's best to know the exact file size beforehand to select the most appropriate way to upload the file to telegram. So there are several ways to approach improving the efficiency of the current uploading process: