mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 10:36:39 +00:00
8 lines
207 B
Python
8 lines
207 B
Python
from fastapi import FastAPI, File, Form
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.post("/files/")
|
|
async def create_file(*, file: bytes = File(...), token: str = Form(...)):
|
|
return {"file_size": len(file), "token": token}
|