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.
Uploads work fine and images do exactly what I want but non-images files have the extension .txt added, for example, docs.pdf uploads as docs.pdf.txt.
So what am I doing wrong? Is it simply that my logic is expecting to process and resize images and so, not being an image, it gets the extension added? Do I need to check for image uploads ($file_is_image) and use different logic for non-images?Reply
Uploads work fine and images do exactly what I want but non-images files have the extension .txt added, for example, docs.pdf uploads as docs.pdf.txt.
So what am I doing wrong? Is it simply that my logic is expecting to process and resize images and so, not being an image, it gets the extension added? Do I need to check for image uploads ($file_is_image) and use different logic for non-images?