Sublime directory Surf the web anonymous Pagerank Monitor


Upload a Logo

mendiael
Sat 9 June 2007, 09:18 pm GMT +0300
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?


olaf
Sat 9 June 2007, 09:35 pm GMT +0300
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

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional