Skip to content

Mime Type of Attachements #580

@enaske

Description

@enaske

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions