I am currently thinking of creating an image, as I have seen that it will be a pretty safe way.
, , : P. , , , .
, Fileinfo (mime_content_type() PHP).
PHP- Mimetype, Fileinfo:
. .
, PHP ... CVE. , - :
, GD , , . , ImagMagick Gmagick ... ImageMagick ( , ), Gmagick .