code: def request_upload_token(self, file):
          
          self.kwargs['name'] = os.path.basename(file.name)
          self.kwargs['size'] = os.fstat(file.fileno()).st_size
  
          response = self._requester.request(
              'POST',
              self.url,
              _kwargs=combine_kwargs(**self.kwargs)
          )
  
          return self.upload(response, file)
docs: Request an upload token.
  
          :param file: A file handler pointing to the file to upload.
          :returns: True if the file uploaded successfully, False otherwise, \
              and the JSON response from the API.
          :rtype: tuple