gotornot Posted December 18, 2010 Share Posted December 18, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/222051-an-image-upload-problem/ Share on other sites More sharing options...
litebearer Posted December 18, 2010 Share Posted December 18, 2010 1. you can check to see if same name exists before 'moving' the image and if it does, simply generate a new name. 2. yes, you can easily add the ability to check image type 3. yes, you can either reject or resize images during your upload process. Sooooo.... the secret is A. Show us your existing code B. do a google search of 'php resize image' 'php upload image unique name' 'php upload image restrict type'. Quote Link to comment https://forums.phpfreaks.com/topic/222051-an-image-upload-problem/#findComment-1149051 Share on other sites More sharing options...
QuickOldCar Posted December 18, 2010 Share Posted December 18, 2010 I just posted some info you can use in the forum. http://www.phpfreaks.com/forums/php-coding-help/upload-script-318700/ Quote Link to comment https://forums.phpfreaks.com/topic/222051-an-image-upload-problem/#findComment-1149089 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.