FastAPI - File Handling
Consider this FastAPI endpoint:
What will this endpoint return after a file upload?
from fastapi import FastAPI, UploadFile, File
app = FastAPI()
@app.post('/upload')
async def upload(file: UploadFile = File(...)):
content = await file.read()
return {'name': file.filename, 'length': len(content)}What will this endpoint return after a file upload?
