projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd46550
)
Fix file size limit for media_upload
author
Elad Alfassa
<elad@fedoraproject.org>
Sun, 3 Apr 2016 15:49:10 +0000
(18:49 +0300)
committer
Elad Alfassa
<elad@fedoraproject.org>
Sun, 3 Apr 2016 15:49:10 +0000
(18:49 +0300)
According to https://dev.twitter.com/rest/reference/post/media/upload
the limit of this endpoint is 5MB (which is 4883KiB) per file.
tweepy/api.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/api.py
b/tweepy/api.py
index b925da3884a84cc9efee4f58850701dc2ac96592..2fd6bee33b7d6c1e7161fd327090fbf792bae0a9 100644
(file)
--- a/
tweepy/api.py
+++ b/
tweepy/api.py
@@
-198,7
+198,7
@@
class API(object):
:allowed_param:
"""
f = kwargs.pop('file', None)
- headers, post_data = API._pack_image(filename,
3072
, form_field='media', f=f)
+ headers, post_data = API._pack_image(filename,
4883
, form_field='media', f=f)
kwargs.update({'headers': headers, 'post_data': post_data})
return bind_api(