def METHOD_NAME(self, filename, filepath=None, bytes=None):
    params = [('action', 'add-file')]
    form = MultiPartForm()
    if filepath is not None:
        file_handler = open(filepath)
    else:
        file_handler = StringIO.StringIO(bytes)
    form.add_file('torrent_file', filename.encode('utf-8'), file_handler)
    return self._action(params, str(form), form.get_content_type())