+
    ‡)Ùj�  ã                   óð   € R t ^ RIt^ RIHtHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht . ROt ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R	4      t ! R R
]4      t ! R R]4      tR tR# )zH
Base file upload handler classes, and the built-in concrete subclasses
N)ÚBytesIOÚUnsupportedOperation)Úsettings)ÚInMemoryUploadedFileÚTemporaryUploadedFile©Úimport_stringÚUploadFileExceptionÚ
StopUploadÚSkipFileÚFileUploadHandlerÚTemporaryFileUploadHandlerÚMemoryFileUploadHandlerÚStopFutureHandlersc                   ó   € ] tR t^tRtRtR# )r	   z.
Any error having to do with uploading files.
© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚX/var/www/eggtrainer/venv/lib/python3.14/site-packages/django/core/files/uploadhandler.pyr	   r	      ó   † ñó 	r   c                   ó4   a € ] tR t^ t o RtRR ltR tRtV tR# )r
   z5
This exception is raised when an upload must abort.
c                ó   € Wn         R# )z²
If ``connection_reset`` is ``True``, Django knows will halt the upload
without consuming the rest of the upload. This will cause the browser to
show a "connection reset" error.
N©Úconnection_reset)Úselfr   s   &&r   Ú__init__ÚStopUpload.__init__%   s
   € ð !1Ör   c                ó.   € V P                   '       d   R # R# )z StopUpload: Halt current upload.z,StopUpload: Consume request data, then halt.r   ©r    s   &r   Ú__str__ÚStopUpload.__str__-   s   € Ø× × Ð Ù5áAr   r   N)F)	r   r   r   r   r   r!   r%   r   Ú__classdictcell__©Ú__classdict__s   @r   r
   r
       s   ø‡ € ñô1÷Bð Br   c                   ó   € ] tR t^4tRtRtR# )r   zP
This exception is raised by an upload handler that wants to skip a given file.
r   Nr   r   r   r   r   r   4   r   r   c                   ó   € ] tR t^<tRtRtR# )r   zˆ
Upload handlers that have handled a file and do not want future handlers to
run should raise this exception instead of returning None.
r   Nr   r   r   r   r   r   <   s   † ñó
 	r   c                   ó^   a € ] tR t^Et o RtRtRR ltRR ltRR ltR t	R t
R tR	 tR
tV tR# )r   z+
Base class for streaming upload handlers.
Nc                óX   € R V n         R V n        R V n        R V n        R V n        Wn        R # ©N)Ú	file_nameÚcontent_typeÚcontent_lengthÚcharsetÚcontent_type_extraÚrequest)r    r4   s   &&r   r!   ÚFileUploadHandler.__init__L   s-   € ØˆŒØ ˆÔØ"ˆÔØˆŒØ"&ˆÔØŽr   c                ó   € R# )af  
Handle the raw input from the client.

Parameters:

    :input_data:
        An object that supports reading via .read().
    :META:
        ``request.META``.
    :content_length:
        The (integer) value of the Content-Length header from the
        client.
    :boundary: The boundary from the Content-Type header. Be sure to
        prepend two '--'.
Nr   )r    Ú
input_dataÚMETAr1   ÚboundaryÚencodings   &&&&&&r   Úhandle_raw_inputÚ"FileUploadHandler.handle_raw_inputT   s   € ñ$ 	r   c                óN   € Wn         W n        W0n        W@n        WPn        W`n        R# )z�
Signal that a new file has been started.

Warning: As with any data from the client, you should not trust
content_length (and sometimes won't even get it).
N)Ú
field_namer/   r0   r1   r2   r3   )r    r>   r/   r0   r1   r2   r3   s   &&&&&&&r   Únew_fileÚFileUploadHandler.new_fileh   s%   € ð %ŒØ"ŒØ(ÔØ,ÔØŒØ"4Ör   c                ó   € \        R4      h)zc
Receive data from the streamed upload parser. ``start`` is the position
in the file of the chunk.
zJsubclasses of FileUploadHandler must provide a receive_data_chunk() method©ÚNotImplementedError©r    Úraw_dataÚstarts   &&&r   Úreceive_data_chunkÚ$FileUploadHandler.receive_data_chunk~   s   € ô
 "ØXó
ð 	
r   c                ó   € \        R4      h)z¦
Signal that a file has completed. File size corresponds to the actual
size accumulated by all the chunks.

Subclasses should return a valid ``UploadedFile`` object.
zEsubclasses of FileUploadHandler must provide a file_complete() methodrB   ©r    Ú	file_sizes   &&r   Úfile_completeÚFileUploadHandler.file_complete‡   s   € ô "ØSó
ð 	
r   c                ó   € R# )zk
Signal that the upload is complete. Subclasses should perform cleanup
that is necessary for this handler.
Nr   r$   s   &r   Úupload_completeÚ!FileUploadHandler.upload_complete’   ó   € ñ
 	r   c                ó   € R# )zo
Signal that the upload was interrupted. Subclasses should perform
cleanup that is necessary for this handler.
Nr   r$   s   &r   Úupload_interruptedÚ$FileUploadHandler.upload_interrupted™   rQ   r   )r2   r1   r0   r3   r>   r/   r4   i   r.   )NN)r   r   r   r   r   Ú
chunk_sizer!   r;   r?   rG   rL   rO   rS   r   r'   r(   s   @r   r   r   E   s9   ø‡ € ñð €Jôôô(5ò,
ò	
ò÷ð r   c                   óH   a a€ ] tR t^¡t oRtV 3R ltR tR tR tRt	Vt
V ;t# )r   z9
Upload handler that streams data into a temporary file.
c                ó    <€ \         SV `  ! V/ VB  \        V P                  V P                  ^ V P
                  V P                  4      V n        R# )z;
Create the file object to append to as data is coming in.
N)Úsuperr?   r   r/   r0   r2   r3   Úfile©r    ÚargsÚkwargsÚ	__class__s   &*,€r   r?   Ú#TemporaryFileUploadHandler.new_file¦   sB   ø€ ô 	‰Ò˜$Ð) &Ò)Ü)Ø�N‰N˜D×-Ñ-¨q°$·,±,À×@WÑ@Wó
ˆŽ	r   c                ó<   € V P                   P                  V4       R # r.   )rY   ÚwriterD   s   &&&r   rG   Ú-TemporaryFileUploadHandler.receive_data_chunk¯   s   € Ø�	‰	�‰˜Ö!r   c                óp   € V P                   P                  ^ 4       WP                   n        V P                   # )é    )rY   ÚseekÚsizerJ   s   &&r   rL   Ú(TemporaryFileUploadHandler.file_complete²   s%   € Ø�	‰	�‰�qÔØ"�	‰	ŒØ�y‰yÐr   c                óè   € \        V R 4      '       dN   V P                  P                  4       p V P                  P                  4        \        P
                  ! V4       R# R#   \         d     R# i ; i)rY   N)ÚhasattrrY   Útemporary_file_pathÚcloseÚosÚremoveÚFileNotFoundError)r    Útemp_locations   & r   rS   Ú-TemporaryFileUploadHandler.upload_interrupted·   sY   € Ü�4˜× Ò Ø ŸI™I×9Ñ9Ó;ˆMðØ—	‘	—‘Ô!Ü—	’	˜-Ö(ñ	 !øô
 %ô Úðús   ®0A" Á"A1Á0A1)rY   )r   r   r   r   r   r?   rG   rL   rS   r   r'   Ú__classcell__©r]   r)   s   @@r   r   r   ¡   s#   ù‡ € ñõ
ò"ò÷
ò r   c                   óL   a a€ ] tR t^Át oRtRR ltV 3R ltR tR tRt	Vt
V ;t# )r   zK
File upload handler to stream uploads into memory (used for small files).
c                óú   € \        VRV4      p VP                  ^ \        P                  4      pVP                  ^ 4       VRJ;'       d    V\        P                  8*  V n        R#   \        \
        3 d     L9i ; i)zN
Use the content_length to signal whether or not this handler should be
used.
Ú_streamN)	Úgetattrrd   rk   ÚSEEK_ENDr   ÚAttributeErrorr   ÚFILE_UPLOAD_MAX_MEMORY_SIZEÚ	activated)r    r7   r8   r1   r9   r:   Ústreams   &&&&&& r   r;   Ú(MemoryFileUploadHandler.handle_raw_inputÆ   s|   € ô ˜ Y°
Ó;ˆð	Ø#Ÿ[™[¨¬B¯K©KÓ8ˆNð �K‰K˜ŒNà $Ð&÷ Gð GØ¤(×"FÑ"FÑFð 	Žøô %¤nÐ5ô 	ñ ð	ús   � A& Á&A:Á9A:c                ó~   <€ \         SV `  ! V/ VB  V P                  '       d   \        4       V n        \        4       hR # r.   )rX   r?   ry   r   rY   r   rZ   s   &*,€r   r?   Ú MemoryFileUploadHandler.new_fileà   s5   ø€ Ü‰Ò˜$Ð) &Ò)Ø�>�>ˆ>Ü›	ˆDŒIÜ$Ó&Ð&ñ r   c                ód   € V P                   '       d   V P                  P                  V4       R# V# )z!Add the data to the BytesIO file.N)ry   rY   r`   rD   s   &&&r   rG   Ú*MemoryFileUploadHandler.receive_data_chunkæ   s    € à�>�>ˆ>Ø�I‰I�O‰O˜HÖ%àˆOr   c           
     óü   € V P                   '       g   R# V P                  P                  ^ 4       \        V P                  V P                  V P
                  V P                  VV P                  V P                  R7      # )z2Return a file object if this handler is activated.N)rY   r>   Únamer0   re   r2   r3   )	ry   rY   rd   r   r>   r/   r0   r2   r3   rJ   s   &&r   rL   Ú%MemoryFileUploadHandler.file_completeí   s\   € à�~�~ˆ~Ùà�	‰	�‰�qÔÜ#Ø—‘Ø—‘Ø—‘Ø×*Ñ*ØØ—L‘LØ#×6Ñ6ô
ð 	
r   )ry   rY   r.   )r   r   r   r   r   r;   r?   rG   rL   r   r'   rp   rq   s   @@r   r   r   Á   s#   ù‡ € ñô
õ4'ò÷
ò 
r   c                ó$   € \        V 4      ! V/ VB # )aD  
Given a path to a handler, return an instance of that handler.

E.g.::
    >>> from django.http import HttpRequest
    >>> request = HttpRequest()
    >>> load_handler(
    ...     'django.core.files.uploadhandler.TemporaryFileUploadHandler',
    ...     request,
    ... )
    <TemporaryFileUploadHandler object at 0x...>
r   )Úpathr[   r\   s   &*,r   Úload_handlerr…   þ   s   € ô ˜Ô Ð/¨Ñ/Ð/r   )r	   r
   r   r   r   r   r…   r   )r   rk   Úior   r   Údjango.confr   Údjango.core.files.uploadedfiler   r   Údjango.utils.module_loadingr   Ú__all__Ú	Exceptionr	   r
   r   r   r   r   r   r…   r   r   r   Ú<module>rŒ      s…   ðñó 
ß ,å  ß VÝ 5ò	€ô	˜)ô 	ôBÐ$ô Bô(	Ð"ô 	ô	Ð,ô 	÷Yñ YôxÐ!2ô ô@:
Ð/ô :
ôz0r   