Just another rainy day
Posts: 1
10 credits Members referred : 0
« on: Jun 09, 2007, 09:18:11 PM »
Hello, I would like to give Easy PHP Upload class a try. I want to use it for my CMS like system where site admins can upload a logo for their sites.
I looked at the examples and I think I need a combination of Foto_Upload class and the file_upload class itself.
What I need:
- Only JPG, GIF and PNG files can be uploaded. What about checking the mime type rather than the extension? What happens if I rename an EXE file to GIF and upload it?
- Check Width and Height of the uploaded file. Let's say only images with maximum 240x160 dimensions can be uploaded.
- No renaming, no rotating, no converting.
Any advices?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6280
38506 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Jun 09, 2007, 09:35:44 PM »
you can do this with the foto upload extension (any class derivate has all vars and methods from the parent class)
mime validation is possible but doesn't work on all machines, my suggestion is to check the file after upload with getimagesize