you can also look at
cffile.contenttype and cffile.contentsubtype for mimetype stuffs.  Better than the extension.


hmm...how does CF determine this though?  anyone?


Doug

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 12:04 PM
To: CF-Talk
Subject: RE: Image Issue

> 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