+
    PV-jÉ  ã                   óô   € ^ RI HtHt ^ RIHtHtHtHtHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt  ! R R]4      t ! R R4      t]! R4      tR R lt]! R4      tR# )é    )ÚCallableÚMapping)Ú	AnnotatedÚAnyÚBinaryIOÚTypeVarÚcast)ÚDoc)ÚGetJsonSchemaHandler)ÚURL)ÚAddress)ÚFormData)ÚHeaders)ÚQueryParams)ÚState)Ú
UploadFilec                   óî   a a€ ] tR t^t oRtV3R lV 3R lltRV3R lV 3R llltV3R lV 3R lltV3R lV 3R	 llt]	V3R
 lR l4       t
]	V3R lR l4       t]	V3R lR l4       tV3R ltRtVtV ;t# )r   añ  
A file uploaded in a request.

Define it as a *path operation function* (or dependency) parameter.

If you are using a regular `def` function, you can use the `upload_file.file`
attribute to access the raw standard Python file (blocking, not async), useful and
needed for non-async code.

Read more about it in the
[FastAPI docs for Request Files](https://fastapi.tiangolo.com/tutorial/request-files/).

## Example

```python
from typing import Annotated

from fastapi import FastAPI, File, UploadFile

app = FastAPI()


@app.post("/files/")
async def create_file(file: Annotated[bytes, File()]):
    return {"file_size": len(file)}


@app.post("/uploadfile/")
async def create_upload_file(file: UploadFile):
    return {"filename": file.filename}
```
c                óF   <€ V ^8„  d   QhRS[ S[S[! R4      3,          RR/# )é   ÚdatazA
                The bytes to write to the file.
                ÚreturnN)r   Úbytesr
   )ÚformatÚ__classdict__s   "€Úg/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/fastapi/datastructures.pyÚ__annotate__ÚUploadFile.__annotate__B   s9   ø€ ÷ )ñ )áÙÚðóðõ
ð)ð 
ñ)ó    c              ƒ  ó>   <"  € \         SV `  V4      G Rj  x€L
 #  L5i)z¦
Write some bytes to the file.

You normally wouldn't use this from a file you read in a request.

To be awaitable, compatible with async, this is run in threadpool.
N)ÚsuperÚwrite)Úselfr   Ú	__class__s   &&€r   r!   ÚUploadFile.writeB   s   øé € ô$ ‘W‘] 4Ó(×(Ð(Ñ(ùó   ƒ–—c                óH   <€ V ^8„  d   QhRS[ S[S[! R4      3,          RS[/# )r   ÚsizezL
                The number of bytes to read from the file.
                r   )r   Úintr
   r   )r   r   s   "€r   r   r   V   s9   ø€ ÷ (ñ (áÙÚðóðõ
ð(ñ 
ñ(r   c              ƒ  ó>   <"  € \         SV `  V4      G Rj  x€L
 #  L5i)zd
Read some bytes from the file.

To be awaitable, compatible with async, this is run in threadpool.
N)r    Úread)r"   r'   r#   s   &&€r   r*   ÚUploadFile.readV   s   øé € ô  ‘W‘\ $Ó'×'Ð'Ñ'ùr%   c                óF   <€ V ^8„  d   QhRS[ S[S[! R4      3,          RR/# )r   ÚoffsetzO
                The position in bytes to seek to in the file.
                r   N)r   r(   r
   )r   r   s   "€r   r   r   h   s9   ø€ ÷ *ñ *áÙÚðóðõ
ð*ð 
ñ*r   c              ƒ  ó>   <"  € \         SV `  V4      G Rj  x€L
 #  L5i)zž
Move to a position in the file.

Any next read or write will be done from that position.

To be awaitable, compatible with async, this is run in threadpool.
N)r    Úseek)r"   r-   r#   s   &&€r   r/   ÚUploadFile.seekh   s   øé € ô$ ‘W‘\ &Ó)×)Ð)Ñ)ùr%   c                ó   <€ V ^8„  d   QhRR/# )r   r   N© )r   r   s   "€r   r   r   |   s   ø€ ÷ %ñ %˜Tñ %r   c              ƒ  ó<   <"  € \         SV `  4       G Rj  x€L
 #  L5i)zU
Close the file.

To be awaitable, compatible with async, this is run in threadpool.
N)r    Úclose)r"   r#   s   &€r   r4   ÚUploadFile.close|   s   øé € ô ‘W‘]“_×$Ð$Ñ$ùs   ƒ•–c                ó*   <€ V ^8„  d   QhRS[ RS[ RR/# )r   Ú_UploadFile__input_valueÚ_r   r   ©r   )r   r   s   "€r   r   r   …   s"   ø€ ÷ /ñ /¡cð /©cð /°lñ /r   c                ó|   € \        V\        4      '       g   \        R \        V4       24      h\	        \
        V4      # )zExpected UploadFile, received: )Ú
isinstanceÚStarletteUploadFileÚ
ValueErrorÚtyper	   r   )Úclsr7   r8   s   &&&r   Ú	_validateÚUploadFile._validate„   s6   € ä˜-Ô)<×=Ò=ÜÐ>¼tÀMÓ?RÐ>SÐTÓUÐUÜ”J Ó.Ð.r   c                óX   <€ V ^8„  d   QhRS[ S[S[3,          RS[RS[S[S[3,          /# )r   Úcore_schemaÚhandlerr   )r   Ústrr   r   Údict)r   r   s   "€r   r   r   ‹   s;   ø€ ÷ Rñ RÙ!¡#¡s (Õ+ðRÙ6JðRá	‰c‘3ˆh�ñRr   c                ó   € R RRR/# )r>   ÚstringÚcontentMediaTypezapplication/octet-streamr2   )r?   rC   rD   s   &&&r   Ú__get_pydantic_json_schema__Ú'UploadFile.__get_pydantic_json_schema__Š   s   € ð ˜Ð"4Ð6PÐQÐQr   c                ó€   <€ V ^8„  d   QhRS[ S[,          RS[S[.S[S[S[3,          3,          RS[S[S[3,          /# )r   ÚsourcerD   r   )r>   r   r   r   rE   )r   r   s   "€r   r   r   ‘   sL   ø€ ÷ Añ AÙ™#•YðAÙ)1±3°%¹ÁÁcÀÕ9JÐ2JÕ)KðAá	‘‘c�Õ	ñAr   c                ó2   € ^RI Hp V! V P                  4      # )é   )Ú"with_info_plain_validator_function)Ú
_compat.v2rP   r@   )r?   rM   rD   rP   s   &&& r   Ú__get_pydantic_core_schema__Ú'UploadFile.__get_pydantic_core_schema__�   s   € õ 	Cá1°#·-±-Ó@Ð@r   c                ó*  <€ V ^8„  d   Qh/ S[ S[S[! R4      3,          ;R&   S[ S[R,          S[! R4      3,          ;R&   S[ S[R,          S[! R4      3,          ;R&   S[ S[S[! R4      3,          ;R	&   S[ S[R,          S[! R
4      3,          ;R&   # )r   z,The standard Python file object (non-async).ÚfileNzThe original file name.ÚfilenamezThe size of the file in bytes.r'   zThe headers of the request.Úheadersz2The content type of the request, from the headers.Úcontent_type)r   r   r
   rE   r(   r   )r   r   s   "€r   r   r      s¹   ø‡ ‚ ñD ÙÚÐ:Ó;ð	=õñ ñE ñL ™˜d�
¢CÐ(AÓ$BÐBÕCÑCñM ñN ‘C˜$•J¢Ð$DÓ EÐEÕ
FÑFñO ñP ‘w¢Ð$AÓ BÐBÕCÑCñQ ñR Ùˆd�
’CÐLÓMÐMõñ òS r   r2   )éÿÿÿÿ)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r!   r*   r/   r4   Úclassmethodr@   rJ   rR   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r#   r   s   @@r   r   r      s{   ù‡ € ñ÷X)ó )÷((õ (÷$*ó *÷(%ó %ð ÷/ó ð/ð
 ÷Ró ðRð
 ÷Aó ðA÷y … r   r   c                   óZ   a € ] tR t^™t o RtV 3R lR ltV 3R lR ltV 3R lR ltRtV t	R	# )
ÚDefaultPlaceholderz§
You shouldn't use this class directly.

It's used internally to recognize when a default value has been overwritten, even
if the overridden default value was truthy.
c                ó    <€ V ^8„  d   QhRS[ /# )r   Úvaluer9   )r   r   s   "€r   r   ÚDefaultPlaceholder.__annotate__¡   s   ø€ ÷ ñ ™cñ r   c                ó   € Wn         R # ©N©rg   )r"   rg   s   &&r   Ú__init__ÚDefaultPlaceholder.__init__¡   s   € ØŽ
r   c                ó    <€ V ^8„  d   QhRS[ /# )r   r   )Úbool)r   r   s   "€r   r   rh   ¤   s   ø€ ÷  ñ  ™$ñ  r   c                ó,   € \        V P                  4      # rj   )ro   rg   )r"   s   &r   Ú__bool__ÚDefaultPlaceholder.__bool__¤   s   € Ü�D—J‘JÓÐr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Úor   )Úobjectro   )r   r   s   "€r   r   rh   §   s   ø€ ÷ Kñ K™ð K¡4ñ Kr   c                ód   € \        V\        4      ;'       d    VP                  V P                  8H  # rj   )r;   re   rg   )r"   rt   s   &&r   Ú__eq__ÚDefaultPlaceholder.__eq__§   s%   € Ü˜!Ô/Ó0×JÐJ°Q·W±WÀÇ
Á
Ñ5JÐJr   rk   N)
rZ   r[   r\   r]   r^   rl   rq   rw   ra   rb   )r   s   @r   re   re   ™   s*   ø‡ € ñ÷ð ÷ ð  ÷Kö Kr   re   ÚDefaultTypec                ó0   € V ^8„  d   QhR\         R\         /# )r   rg   r   )ry   )r   s   "r   r   r   ®   s   € ÷ %ñ %”;ð %¤;ñ %r   c                ó   € \        V 4      # )zª
You shouldn't use this function directly.

It's used internally to recognize when a default value has been overwritten, even
if the overridden default value was truthy.
)re   rk   s   &r   ÚDefaultr|   ®   s   € ô ˜eÓ$Ð$r   N)Úcollections.abcr   r   Útypingr   r   r   r   r	   Úannotated_docr
   Úpydanticr   Ústarlette.datastructuresr   r   r   r   r   r   r   r<   re   ry   r|   Ú_Unsetr2   r   r   Ú<module>rƒ      si   ðß -÷õ õ Ý )Ý /Ý 7Ý 9Ý 7Ý ?Ý 3Ý FôAAÐ$ô AA÷HKñ Kñ$ �mÓ$€õ%ñ 
�‹‚r   