mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-27 14:01:13 +00:00
Added missing mime_type argument to call to media-post()
This commit is contained in:
parent
a24f43dbfa
commit
2c0157ad44
4
twoot.py
4
twoot.py
|
@ -314,11 +314,9 @@ def main(argv):
|
|||
# Download picture
|
||||
media = requests.get(photo)
|
||||
|
||||
mime_type = media.headers['content-type']
|
||||
|
||||
# Upload picture to Mastodon instance
|
||||
try:
|
||||
media_posted = mastodon.media_post(media.content)
|
||||
media_posted = mastodon.media_post(media.content, mime_type=media.headers['content-type'])
|
||||
media_ids.append(media_posted['id'])
|
||||
except MastodonAPIError: # Media cannot be uploaded (invalid format, dead link, etc.)
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue
Block a user