docs: def media_upload(self, filename, *args, **kwargs):
          """ :reference: https://dev.twitter.com/rest/reference/post/media/upload
              :reference https://dev.twitter.com/rest/reference/post/media/upload-chunked
              :allowed_param:
          """
          f = kwargs.pop('file', None)
  
          mime, _ = mimetypes.guess_type(filename)
          size = getfilesize(filename, f)
  
          if mime in IMAGE_MIMETYPES and size < self.max_size_standard:
              return self.image_upload(filename, file=f, *args, **kwargs)
  
          elif mime in CHUNKED_MIMETYPES:
              return self.upload_chunked(filename, file=f, *args, **kwargs)
  
          else:
              raise TweepError("Can't upload media with mime type %s" % mime)