+
    DiU                         ^ RI Ht ^ RIHtHt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# )    )Mapping)	AnnotatedAnyBinaryIOCallableOptional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   "t/Users/tonyclaw/.openclaw/workspace/services/omi-webhook/venv/lib/python3.14/site-packages/fastapi/datastructures.py__annotate__UploadFile.__annotate__D   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.writeD   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   X   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.readX   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   j   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   r0   UploadFile.seekj   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   r5   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   )clsr8   r9   s   &&&r   	_validateUploadFile._validate   s6    -)<==>tM?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      s6     6 6!#s(+66J6	c3h6r   c                    R RRR/# )r?   stringr   binaryr3   )r@   rD   rE   s   &&&r   __get_pydantic_json_schema__'UploadFile.__get_pydantic_json_schema__   s     (H55r   c                   < V ^8  d   QhRS[ S[,          RS[S[.S[S[S[3,          3,          RS[S[S[3,          /# )r   sourcerE   r   )r?   r   r   r   rF   )r   r   s   "r   r   r      sL     A A#YA)13%c9J2J)KA	c	Ar   c                2    ^RI Hp V! V P                  4      # )   )"with_info_plain_validator_function)
_compat.v2rQ   rA   )r@   rN   rE   rQ   s   &&& r   __get_pydantic_core_schema__'UploadFile.__get_pydantic_core_schema__   s     	C1#--@@r   c                0  < V ^8  d   Qh/ S[ S[S[! R4      3,          ;R&   S[ S[S[,          S[! R4      3,          ;R&   S[ S[S[,          S[! R4      3,          ;R&   S[ S[S[! R4      3,          ;R&   S[ S[S[,          S[! R	4      3,          ;R
&   # )r   z,The standard Python file object (non-async).filez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   r   rF   r)   r   )r   r   s   "r   r   r      s     D :;	= E L s+D'EEFFM N HSM3'G#HH
IIO P w$A BBCCQ R sOPP S r   r3   ))__name__
__module____qualname____firstlineno____doc__r"   r+   r0   r5   classmethodrA   rK   rS   __annotate_func____static_attributes____classdictcell____classcell__)r$   r   s   @@r   r   r      sy     X) )(( ($* *(% % / /
 6 6
 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   valuer:   )r   r   s   "r   r   DefaultPlaceholder.__annotate__   s      c r   c                    Wn         R # Nrh   )r#   rh   s   &&r   __init__DefaultPlaceholder.__init__   s    
r   c                    < V ^8  d   QhRS[ /# )r   r   )bool)r   r   s   "r   r   ri      s        $  r   c                ,    \        V P                  4      # rk   )rp   rh   )r#   s   &r   __bool__DefaultPlaceholder.__bool__   s    DJJr   c                &   < V ^8  d   QhRS[ RS[/# )r   or   )objectrp   )r   r   s   "r   r   ri      s     K K K4 Kr   c                d    \        V\        4      ;'       d    VP                  V P                  8H  # rk   )r<   rf   rh   )r#   ru   s   &&r   __eq__DefaultPlaceholder.__eq__   s%    !/0JJQWW

5JJr   rl   N)
r[   r\   r]   r^   r_   rm   rr   rx   rb   rc   )r   s   @r   rf   rf      s*         K Kr   rf   DefaultTypec                0    V ^8  d   QhR\         R\         /# )r   rh   r   )rz   )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.
)rf   rl   s   &r   Defaultr}      s     e$$r   N)collections.abcr   typingr   r   r   r   r   r	   r
   annotated_docr   pydanticr   starlette.datastructuresr   r   r   r   r   r   r   r=   rf   rz   r}   r3   r   r   <module>r      sc    #    ) / 7 9 7 ? 3 FAA$ AAHK K$ m$%r   