def request_upload_token(self, file):
self.kwargs['<STR_LIT:name>'] = os.path.basename(file.name)<EOL>self.kwargs['<STR_LIT:size>'] = os.fstat(file.fileno()).st_size<EOL>response = self._requester.request(<EOL>'<STR_LIT:POST>',<EOL>self.url,<EOL>_kwargs=combine_kwargs(**self.kwargs)<EOL>)<EOL>return self.upload(response, file)<EOL>
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