https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/django/core/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/core/files/uploadhandler.pyc
�
r�\c@s7dZddlmZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
dd	d
ddd
ddgZdefd��YZedefd��Y�Zdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZd�ZdS( uH
Base file upload handler classes, and the built-in concrete subclasses
i����(tunicode_literals(tBytesIO(tsettings(tTemporaryUploadedFiletInMemoryUploadedFile(tpython_2_unicode_compatible(timport_by_pathuUploadFileExceptionu
StopUploaduSkipFileuFileUploadHandleruTemporaryFileUploadHandleruMemoryFileUploadHandleruload_handleruStopFutureHandlerstUploadFileExceptioncBseZdZRS(u6
    Any error having to do with uploading files.
    (t__name__t
__module__t__doc__(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyRst
StopUploadcBs#eZdZed�Zd�ZRS(u=
    This exception is raised when an upload must abort.
    cCs
||_dS(u�
        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(tconnection_reset(tselfR((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyt__init__scCs|jr
dSdSdS(Nu StopUpload: Halt current upload.u,StopUpload: Consume request data, then halt.(R(R
((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyt__str__%s	(RR	R
tFalseRR(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyRstSkipFilecBseZdZRS(uX
    This exception is raised by an upload handler that wants to skip a given file.
    (RR	R
(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR+stStopFutureHandlerscBseZdZRS(u�
    Upload handers that have handled a file and do not want future handlers to
    run should raise this exception instead of returning None.
    (RR	R
(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR1stFileUploadHandlercBsWeZdZdd
Zdd�Zdd�Zdd�Zd�Zd�Z	d	�Z
RS(u3
    Base class for streaming upload handlers.
    i@ii
cCs1d|_d|_d|_d|_||_dS(N(tNonet	file_nametcontent_typetcontent_lengthtcharsettrequest(R
R((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR>s
				cCsdS(u�
        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 '--'.
        N((R
t
input_datatMETARtboundarytencoding((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pythandle_raw_inputEscCs1||_||_||_||_||_dS(u�
        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(t
field_nameRRRR(R
RRRRR((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pytnew_fileWs
				cCs
t��dS(u{
        Receive data from the streamed upload parser. ``start`` is the position
        in the file of the chunk.
        N(tNotImplementedError(R
traw_datatstart((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pytreceive_data_chunkdscCs
t��dS(u�
        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.
        N(R!(R
t	file_size((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyt
file_completekscCsdS(u�
        Signal that the upload is complete. Subclasses should perform cleanup
        that is necessary for this handler.
        N((R
((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pytupload_completetsiN(RR	R
t
chunk_sizeRRRR R$R&R'(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR8s

			tTemporaryFileUploadHandlercBs2eZdZd�Zd�Zd�Zd�ZRS(uA
    Upload handler that streams data into a temporary file.
    cOstt|�j||�dS(N(tsuperR)R(R
targstkwargs((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyRscOsAtt|�j|||�t|j|jd|j�|_dS(uK
        Create the file object to append to as data is coming in.
        iN(R*R)R RRRRtfile(R
RR+R,((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR �scCs|jj|�dS(N(R-twrite(R
R"R#((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR$�scCs#|jjd�||j_|jS(Ni(R-tseektsize(R
R%((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR&�s(RR	R
RR R$R&(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR){s
			tMemoryFileUploadHandlercBs5eZdZdd�Zd�Zd�Zd�ZRS(uS
    File upload handler to stream uploads into memory (used for small files).
    cCs(|tjkrt|_n	t|_dS(u`
        Use the content_length to signal whether or not this handler should be in use.
        N(RtFILE_UPLOAD_MAX_MEMORY_SIZERt	activatedtTrue(R
RRRRR((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR�scOs>tt|�j||�|jr:t�|_t��ndS(N(R*R1R R3RR-R(R
R+R,((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR �s	cCs$|jr|jj|�n|SdS(u3
        Add the data to the BytesIO file.
        N(R3R-R.(R
R"R#((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR$�s	c
CsW|js
dS|jjd�td|jd|jd|jd|jd|d|j�S(	u:
        Return a file object if we're activated.
        NiR-RtnameRR0R(R3R-R/RRRRR(R
R%((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR&�s					N(RR	R
RRR R$R&(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyR1�s
			cOst|�||�S(u�
    Given a path to a handler, return an instance of that handler.

    E.g.::
        >>> load_handler('django.core.files.uploadhandler.TemporaryFileUploadHandler', request)
        <TemporaryFileUploadHandler object at 0x...>

    (R(tpathR+R,((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pytload_handler�s	N(R
t
__future__RtioRtdjango.confRtdjango.core.files.uploadedfileRRtdjango.utils.encodingRtdjango.utils.module_loadingRt__all__t	ExceptionRRRRtobjectRR)R1R7(((sA/tmp/pip-install-XxeQeY/django/django/core/files/uploadhandler.pyt<module>s$C1

https://t.me/AnonymousX5 - 2025