Skip to content
Advertisement

Tag: temporary-files

How to save UploadFile in FastAPI

I accept the file via POST. When I save it locally, I can read the content using file.read (), but the name via file.name incorrect(16) is displayed. When I try to find it by this name, I get an error. What might be the problem? My code: Answer Background UploadFile is just a wrapper around SpooledTemporaryFile, which can be accessed

Advertisement