mirror of https://github.com/tiangolo/fastapi.git
36 lines
1.1 KiB
Markdown
36 lines
1.1 KiB
Markdown
# 📨 📨 & 📁
|
|
|
|
👆 💪 🔬 📁 & 📨 🏑 🎏 🕰 ⚙️ `File` & `Form`.
|
|
|
|
!!! info
|
|
📨 📂 📁 & /⚖️ 📨 📊, 🥇 ❎ <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
|
|
|
|
🤶 Ⓜ. `pip install python-multipart`.
|
|
|
|
## 🗄 `File` & `Form`
|
|
|
|
```Python hl_lines="1"
|
|
{!../../../docs_src/request_forms_and_files/tutorial001.py!}
|
|
```
|
|
|
|
## 🔬 `File` & `Form` 🔢
|
|
|
|
✍ 📁 & 📨 🔢 🎏 🌌 👆 🔜 `Body` ⚖️ `Query`:
|
|
|
|
```Python hl_lines="8"
|
|
{!../../../docs_src/request_forms_and_files/tutorial001.py!}
|
|
```
|
|
|
|
📁 & 📨 🏑 🔜 📂 📨 📊 & 👆 🔜 📨 📁 & 📨 🏑.
|
|
|
|
& 👆 💪 📣 📁 `bytes` & `UploadFile`.
|
|
|
|
!!! warning
|
|
👆 💪 📣 💗 `File` & `Form` 🔢 *➡ 🛠️*, ✋️ 👆 💪 🚫 📣 `Body` 🏑 👈 👆 ⌛ 📨 🎻, 📨 🔜 ✔️ 💪 🗜 ⚙️ `multipart/form-data` ↩️ `application/json`.
|
|
|
|
👉 🚫 🚫 **FastAPI**, ⚫️ 🍕 🇺🇸🔍 🛠️.
|
|
|
|
## 🌃
|
|
|
|
⚙️ `File` & `Form` 👯♂️ 🕐❔ 👆 💪 📨 💽 & 📁 🎏 📨.
|