Improve API.update_profile_banner file uploading
authorHarmon <Harmon758@gmail.com>
Thu, 14 Jan 2021 11:36:20 +0000 (05:36 -0600)
committerHarmon <Harmon758@gmail.com>
Thu, 14 Jan 2021 11:36:20 +0000 (05:36 -0600)
commit181c594a3b2fe3d546e58c253ffcebd80bd81f47
tree4fd929b6232f9c0a959735b09f0b52d0a230e440
parent995e50e67868aba9ead7960cd4ccbf370aa3b1ac
Improve API.update_profile_banner file uploading

Use files parameter of requests Session.request
Allow Twitter's API to respond with 413 HTTP status code and "media type unrecognized." errors instead of checking for file size and type prior to upload.
The previous max file size restriction of 700 KiB seems to have been significantly overly restrictive regardless.
tweepy/api.py