class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
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!
$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? Thanks