From 2c0157ad44b31b6f89ec9698125096729aa62c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JC=20Fran=C3=A7ois?= Date: Tue, 17 Sep 2019 13:44:03 +0000 Subject: [PATCH] Added missing mime_type argument to call to media-post() --- twoot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/twoot.py b/twoot.py index 381322f..c51f860 100755 --- a/twoot.py +++ b/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