[thelist] ASP and Imgs

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Tue Oct 22 08:09:01 CDT 2002

>(1) setting up an 'upload' directory for the client to load
>the pictures into.
>(2) running a scheduled job to move the pictures to the directory
>they should be in, check for duplicate names - overwrite or
>append a numeric - your choice, and add the link to the db.  (Or
>give the client an "admin" page to run this process.)
>(3) the process would also clear out the 'upload' directory.
>(4) you could send the customer an email at this point ... or not.
>(5) have a password protected dynamic "admin" page that looks for
>pictures in the db with no <information about them> and lets the
>client 'fill in' the missing information for these new pictures
>and loads that into the db.

I would go one step farther, since according to the subject line this is ASP
I would get a free or paid-for file upload component (or heck, use one of
the roll-your-own vb or even the vbscript-only ones if you can't add
components to the server) and then have the upload processing logic do steps
1-5 all at once.

User fills out form with all necessary info from step 5 and gives the path
to the file, then uploads file over the web using the form, server puts file
in appropriate location, determines name/link of the file, upates the
database (insert,update,etc) and then responds to the user with web
confirmation the process succeeded.

Even better if you really want to go crazy you can wrap the ASP script in a
transaction, so if it fails halfway it rolls back the file upload. I think
at least, I don't use transactions so far myself...


More information about the thelist mailing list