diff options
-rw-r--r-- | mastodon/Mastodon.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index b118421..8c2bf8c 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -776,7 +776,7 @@ class Mastodon: | |||
776 | ### | 776 | ### |
777 | # Writing data: Media | 777 | # Writing data: Media |
778 | ### | 778 | ### |
779 | def media_post(self, media_file, mime_type=None): | 779 | def media_post(self, media_file, mime_type=None, description=None): |
780 | """ | 780 | """ |
781 | Post an image. media_file can either be image data or | 781 | Post an image. media_file can either be image data or |
782 | a file name. If image data is passed directly, the mime | 782 | a file name. If image data is passed directly, the mime |
@@ -804,7 +804,8 @@ class Mastodon: | |||
804 | 804 | ||
805 | media_file_description = (file_name, media_file, mime_type) | 805 | media_file_description = (file_name, media_file, mime_type) |
806 | return self.__api_request('POST', '/api/v1/media', | 806 | return self.__api_request('POST', '/api/v1/media', |
807 | files={'file': media_file_description}) | 807 | files={'file': media_file_description}, |
808 | params={'description': description}) | ||
808 | 809 | ||
809 | ### | 810 | ### |
810 | # Writing data: Domain blocks | 811 | # Writing data: Domain blocks |