HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
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