From 72468a280f11303313d47ffdcd16b685d6299e0a Mon Sep 17 00:00:00 2001 From: Vitaliy Kucheryaviy Date: Fri, 8 Sep 2023 18:02:17 +0300 Subject: [PATCH] Example multiple files and some meta #269 --- docs/docs/guides/input/file-params.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/guides/input/file-params.md b/docs/docs/guides/input/file-params.md index 5e8e85cd5..b92df3c87 100644 --- a/docs/docs/guides/input/file-params.md +++ b/docs/docs/guides/input/file-params.md @@ -78,3 +78,12 @@ this will expect from client side to send data as multipart/form-data with 2 fie - details: Json as string - file: file + + +### List of files with extra info + +```Python +@api.post('/user') +def create_user(request, details: UserDetails = Form(...), files: list[UploadedFile] = File(...)): + return [details.dict(), [f.name for f in files]] +```