3 changed files with 2 additions and 22 deletions
@ -1,17 +0,0 @@ |
|||
from fastapi import FastAPI, File, Form, UploadFile |
|||
from typing_extensions import Annotated |
|||
|
|||
app = FastAPI() |
|||
|
|||
|
|||
@app.post("/files/") |
|||
async def create_file( |
|||
file: Annotated[bytes, File()], |
|||
fileb: Annotated[UploadFile, File()], |
|||
token: Annotated[str, Form()], |
|||
): |
|||
return { |
|||
"file_size": len(file), |
|||
"token": token, |
|||
"fileb_content_type": fileb.content_type, |
|||
} |
|||
Loading…
Reference in new issue