Jump to content

An Image Upload Problem


gotornot

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/222051-an-image-upload-problem/
Share on other sites

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'. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.