if uploading incorrect mime-type, stop submit

See all posts Reply

if uploading incorrect mime-type, stop submit new!
by Kathy, 10 years, 8 months ago
I've got my list of allowable file types identified as such:
$handle->allowed = array('image/jpeg', 'image/bmp', 'image/png', 'video/x-msvideo', 'video/quicktime');

When I submit my form, if I don't have one of type types above, the form submits, but the file is not uploaded. Is there a way for this class to throw an error and stop submitting or do I have to use js to do that? ThanksReply
Re: if uploading incorrect mime-type, stop submit new!
by colin, 10 years, 8 months ago
The allowed check is done server side, once the file has been uploaded.Reply