aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index cc16a10..d57fb91 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -777,7 +777,7 @@ class Mastodon:
777 ### 777 ###
778 # Writing data: Media 778 # Writing data: Media
779 ### 779 ###
780 def media_post(self, media_file, mime_type=None): 780 def media_post(self, media_file, mime_type=None, description=None):
781 """ 781 """
782 Post an image. media_file can either be image data or 782 Post an image. media_file can either be image data or
783 a file name. If image data is passed directly, the mime 783 a file name. If image data is passed directly, the mime
@@ -805,7 +805,8 @@ class Mastodon:
805 805
806 media_file_description = (file_name, media_file, mime_type) 806 media_file_description = (file_name, media_file, mime_type)
807 return self.__api_request('POST', '/api/v1/media', 807 return self.__api_request('POST', '/api/v1/media',
808 files={'file': media_file_description}) 808 files={'file': media_file_description},
809 params={'description': description})
809 810
810 ### 811 ###
811 # Writing data: Domain blocks 812 # Writing data: Domain blocks
Powered by cgit v1.2.3 (git 2.41.0)