Improve API.update_profile_image file uploading
authorHarmon <Harmon758@gmail.com>
Thu, 14 Jan 2021 11:13:25 +0000 (05:13 -0600)
committerHarmon <Harmon758@gmail.com>
Thu, 14 Jan 2021 11:17:05 +0000 (05:17 -0600)
commit87436995fcf543cd91f1be69531ee25105eaa569
tree1ac55ff9e2ddf0623096d6009c9178ddaaee1b26
parent7c4cfd2248e1edf4228536d2745f6e46d1cdf304
Improve API.update_profile_image file uploading

Use files parameter of requests Session.request
Allow Twitter's API to respond with "Image validation failed with errors: Image size must be <= 2.0 MiB." and "media type unrecognized." errors instead of checking for file size and type prior to upload.
tweepy/api.py