Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Your techniques on Image Upload Managment

Status
Not open for further replies.

imstillatwork

IS-IT--Management
Joined
Sep 26, 2001
Messages
1,605
Location
US
I have done several web sites that allow the user to upload images, delete the image and overwrite with new images.

I am curious how YOU do the following, because its always better to know more than one way:

Keep in mind: multiple users at the same time could be using this, no ones image should be overwritten be another, ever.

1) Upload Image and Insert filename /info into database. sounds simple, and is, but what about error control do you do? what do you check for?

2) Overwrite Image (erase old, upload new)
check db-get filename, check if file exists and remove. remove filename from db. upload new file, insert new filename.

3) Remove Image.
check db for filename, check file exists, remove image, remove filename from db.

like I said, I've done it several times, but it seems like such a bloated process with multiple queries and everything.

thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top