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.
Hey,
is there already a way to get the MIME Type for attachements? Right now I use this snippet:
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.