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.
when uploading my files, I'm trying to distinguish what file type they are (.pdf, .jpg, .xls etc) so that I can send it back via json. Is there something I can add to the upload script to be able to differentiate them and get this info?Reply
After instantiating the class, you can read the extension in file_src_name_ext and the MIME in file_src_mime.