fp.seek(start)
media_id = self.chunked_upload_init(
- file_size, file_type, media_category, *args, **kwargs
+ file_size, file_type, media_category=media_category, *args,
+ **kwargs
).media_id
min_chunk_size, remainder = divmod(file_size, 1000)
return self.chunked_upload_finalize(media_id, *args, **kwargs)
@payload('media')
- def chunked_upload_init(self, total_bytes, media_type, media_category=None,
- additional_owners=None, *args, **kwargs):
+ def chunked_upload_init(self, total_bytes, media_type, *args,
+ media_category=None, additional_owners=None,
+ **kwargs):
""" :reference https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-init
"""
headers = {'Content-Type': 'application/x-www-form-urlencoded'}