HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/__pycache__/attachments.cpython-37.pyc
B

Ta�@sXddlZddlZddlmZddlmZmZerDddlmZm	Z	m
Z
Gdd�de�ZdS)�N)�MYPY)�Item�
PayloadRef)�Optional�Union�Callablec@s&eZdZd	dd�Zdd�Zdd�ZdS)
�
AttachmentNFcCs||dkr|dkrtd��|dkr4|dk	r4tj�|�}|dkrDtd��|dkrZt�|�d}||_||_||_||_||_	dS)Nz)path or raw bytes required for attachmentz#filename is required for attachmentr)
�	TypeError�os�path�basename�	mimetypesZ
guess_type�bytes�filename�content_type�add_to_transactions)�selfrrrrr�r�G/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/attachments.py�__init__s	zAttachment.__init__cCsJd}|jdk	r*t|j�r"|��}q6|j}nt|jd�}t|d|j|jd�S)z-Returns an envelope item for this attachment.N)r�
attachment)�payload�typerr)r�callablerrrrr)rrrrr�to_envelope_item#s


zAttachment.to_envelope_itemcCsd|jfS)Nz<Attachment %r>)r)rrrr�__repr__5szAttachment.__repr__)NNNNF)�__name__�
__module__�__qualname__rrrrrrrrs
r)
r
r
Zsentry_sdk._typesrZsentry_sdk.enveloperr�typingrrr�objectrrrrr�<module>s