Page 1 of 1

An Image Upload Problem

Posted: Sat Dec 18, 2010 1:42 am
by gotornot
Hi

I am looking to make an image uploader for my site. I have written the image upload file but its so basic im fearing it will be broken and if someone uploads an image with the same name it will just copy over someone elses.
I also need to check that its either jpeg or gif and maybe downsize the image so no one uploads a 5meg phot from a digital camera and crashes the site.
Does anyone have any ideas how to do the 3 things above?

Re: An Image Upload Problem

Posted: Sat Dec 18, 2010 3:12 am
by klevis miho
For the first thing, give the image a name like username.jpg (if a user can upload just 1 photo).
If users can upload multiple photos, do something like username_microtime.jpg.