In FastAPI I know that I can return a file (in FileResponse) by passing its path and filename as parameters. Is there any way I can return the file directly without having to save it locally and use the path?
Here's a part of the code for reference:
new_path = path.join(getcwd(), "output", new_filename)
return FileResponse(path = new_path, filename = new_filename)