[thelist] Uploading file names to a database

zac zac at pixelgeek.com
Fri Mar 16 14:58:47 CST 2001

> I'm building a UI for myself that will allow me to add images from my local
> computer to the database on my server.  I am using an <input="text"
> name="image"> form field and then submitting the information to an action
> page which has an INSERT statement.  The problem is that the input value
> includes the entire path.  Is there anyway to only upload the file name
> itself; ie. image.jpg ?

What sort of CGI are you using (the answer is going to differ wildly based
on what sort of language you are using)? If you're using Cold Fusion you can
access the file.serverfile variable to get just the name of the file


Everyone thinks of changing the world, but no one thinks of
changing himself.


email: zac at pixelgeek.com
web: http://www.pixelgeek.com/

More information about the thelist mailing list