See https://github.com/pkp/ojs/blob/ojs-stable-2_4/classes/issue/form/IssueForm.inc.php and https://github.com/pkp/ojs/blob/ojs-stable-2_4/classes/submission/form/ArticleGalleyForm.inc.php#L298 for examples of the existing pattern for checking image uploads. It reports an error when the file type is wrong, it uses the existing list of valid file types rather than re-coding it here, and IIRC it also checks MIME types.