Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2007



Tip: Looking for answers? Try searching our database.

Uploading files using CFFILE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 31 Aug 2007 19:48 GMT
Is there a way to validate the mime type a file that is being uploaded using CFINPUT type="FILE" prior to the user hitting the submit button?
Dan Bracuk - 02 Sep 2007 13:43 GMT
You can't do it with cf code only.  You have to write some javascript and call it on the input's onBlur or onChange event.
Dinghus - 03 Sep 2007 07:57 GMT
The long answer or longer answer is that CF can't tell you what it is until it
gets to the server. Don't forget (it's easy to do) that CF is SERVER side.  
That is why you will need some Javascript to verify what the file type is
before it is submitted.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.