Remove max file size checks for chunked uploads
authorHarmon <Harmon758@gmail.com>
Tue, 12 Jan 2021 21:35:42 +0000 (15:35 -0600)
committerHarmon <Harmon758@gmail.com>
Tue, 12 Jan 2021 21:37:16 +0000 (15:37 -0600)
commit270a76c40bac81dc75d4ba2df27633f9c0dfa0ad
treeb230e25ab72458b03136c5f67fadc353e09bdbf6
parente53b9ddce159ea0f75dc73e8d2a3781253b973b9
Remove max file size checks for chunked uploads

The error messages Twitter's API responds with when the file size is too large, "File size exceeds 15728640 bytes." for GIFs and "File size exceeds 536870912 bytes." for videos, are fairly self-explanatory.
This check was incorrect for videos anyway, which seem to have a size restriction of 512 MiB, not 15 MB.
https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/uploading-media/media-best-practices
https://twittercommunity.com/t/conflicting-documented-size-restrictions-for-video-uploading-via-api/148201
Allowing Twitter's API to handle the size restrictions and avoiding hardcoding them also removes the need to update them in the future if they change.
tweepy/api.py