def upload_file(self, fax_file, **kwargs):  # noqa: E501
        """upload a file  # noqa: E501

        Before sending a fax you need to upload your files using this API. In order to upload your fax file, you have to send a `multipart/form-data` request with your file. If the upload was successful you would receive a `file_path` which you can use to send your fax.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.upload_file(fax_file, async=True)
        >>> result = thread.get()

        :param async bool
        :param file fax_file: (required)
        :param str format: can be 'pdf' or 'tiff'
        :return: File
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.upload_file_with_http_info(fax_file, **kwargs)  # noqa: E501
        else:
            (data) = self.upload_file_with_http_info(fax_file, **kwargs)  # noqa: E501
            return data