uploading files, file types

I wanted to secure the upload to only upload images. I could filter on the '.jpg/.png....' but, is there no property 'file type', or standard filter?

Phalcon\Http\Request\File Object ( [name:protected] => 70638-Energy.jpg [tmp:protected] => /tmp/phpYfs2H2 [_size:protected] => 671834 )

thanks Raymond



2.8k

I could use this:

$extension = end(explode(".", $file->getName()));

and than filter...

Raymond