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?
An Image Upload Problem
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: An Image Upload Problem
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.
If users can upload multiple photos, do something like username_microtime.jpg.