Uploaded file from endpoint always named "none"

I am using the Assistants Python API to create a FastAPI endpoint for assistants. I want to enable uploading files into the assistant and specifying the filename. The file is uploaded, but it is always named “none” - I don’t see how to change it. Here is the relevant code:

def create_file(file, assistant, filename, purpose="assistants"):
    file_info = openai.files.create(purpose=purpose, file=file)
    openai.beta.assistants.update(assistant.id, file_ids=[file_info.id])
    return file_info
  except Exception as e:
    logging.debug(f"*** Error reading file: {e}")
    return None

async def upload_file(request: Request, filename: str = Form(...), file: UploadFile = File(...)):
    assistant = find_assistant(request.session["assistant_id"])

    file_info = create_file(file.file, assistant=assistant, filename=filename)
    if file_info == None:
        return {"message": "Error uploading file"}
        return {
            "filename": filename,
            "content_type": file.content_type,
            "file_size": file_info.bytes,


I believe that is a ‘feature’ at the moment. They should really add that ASAP…