> When I try to upload an image using cffile, How do I check
> for an existence of an image on the action page. For regular
> form fields, we use IsDefined(), but what about for input
> type = file.

After the file has been uploaded, you can look at CFFile.ClientFileExt to
see the extension of the original file. You can also use the ACCEPT
attribute of the CFFILE tag to limit uploads to specific MIME types such as
image/gif. Of course, someone could take any file and rename it to
something.gif before uploading it, and these measures wouldn't prevent that.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to