Your IP : 3.144.70.25


Current Path : /proc/self/root/opt/hc_python/share/doc/pycurl/examples/__pycache__/
Upload File :
Current File : //proc/self/root/opt/hc_python/share/doc/pycurl/examples/__pycache__/file_upload.cpython-312.pyc

�

R��g��	���ddlZddlZddlZGd�d�Zeej
�dkredej
dz�e�ej
dZej
dZ	ejje	�s
ede	z�e�ej�Z
e
jeje�e
jej d�	e
jej"eee	d	��j&�ejj+e	�Ze
jej.e�ed
e	�de���e
j1�e
j3�y)�Nc��eZdZd�Zd�Zy)�
FileReaderc��||_y�N)�fp)�selfrs  �_/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/file_upload.py�__init__zFileReader.__init__
s	�����c�8�|jj|�Sr)r�read)r�sizes  r	�
read_callbackzFileReader.read_callbacks���w�w�|�|�D�!�!rN)�__name__�
__module__�__qualname__r
r�rr	rr	s���"rr�z Usage: %s <url> <file to upload>��z#Error: the file '%s' does not exist�rbzUploading file z to url )�os�sys�pycurlr�len�argv�print�
SystemExit�url�filename�path�exists�Curl�c�setopt�URL�UPLOAD�READFUNCTION�openrr
�getsize�filesize�
INFILESIZE�perform�closerrr	�<module>r/s*��
�
�"�"��s�x�x�=�1��	�
,�s�x�x��{�
:�;�
��	�h�h�q�k���8�8�A�;��	�w�w�~�~�h��	�
/�(�
:�;�
���F�K�K�M��������S������������H�H�V�
 �
 �*�T�(�D�-A�"B�"P�"P�Q�
�7�7�?�?�8�$������	�	�H�%��x��5�6��	�	�����	r

?>