Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mime Type of Attachements #580

Open
enaske opened this issue Oct 8, 2024 · 0 comments
Open

Mime Type of Attachements #580

enaske opened this issue Oct 8, 2024 · 0 comments

Comments

@enaske
Copy link

enaske commented Oct 8, 2024

Hey,

is there already a way to get the MIME Type for attachements? Right now I use this snippet:

$content = $attachment->getDecodedContent();
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$tempFile = tempnam(sys_get_temp_dir(), 'attachment');

Not 100% sure if this is in any kind a security issue, if we open a wrong File to read the MIME_TYPE. So open for Tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant