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.
Note that you try with this new version 0.28RC4, it has stronger MIME type detection, and more extensive logging.
The supported image types : png jpg gif bmp is only stating what GD can handle. No relation with the file you are uploading.
For your issue: if you use the test files provided with the class, you can indeed upload a regular file with the action=image form. As long as the MIME type validation is OK, your file will be uploaded; Then, in the action=image case, it will try to resize the image. But because your file is not an image, it doesn't do any image manipulation, it just uploads.
If you want to restrict the type of files to images only, do something like:
The supported image types : png jpg gif bmp is only stating what GD can handle. No relation with the file you are uploading.
For your issue: if you use the test files provided with the class, you can indeed upload a regular file with the action=image form. As long as the MIME type validation is OK, your file will be uploaded; Then, in the action=image case, it will try to resize the image. But because your file is not an image, it doesn't do any image manipulation, it just uploads.
If you want to restrict the type of files to images only, do something like: