Hi Ian, I suspected as so. I don't know of any development platform that can grab the file name before going to the server. I have tried some javascript controls, but it doesn't work the same for all clients, and of course if someone has spyware or browser problems it'll crash their browser. I don't like to depend on the client for anything when it comes to web development.
Thanks, Rick You can't with ColdFusion. The browser does not tell the server anything about the file before the upload occurs. It just bundles the entire file up and sends it with the request to the server generated when the user selects the 'submit' control. Then the web server takes the file from the request and writes it to a temp file location. It then passes the request to ColdFusion telling it where this temp location is. ColdFusion then does what you tell it to do with the file. To do anything before this must be done on the Client usually with JavaScript. But it is not so easy to access information about any user file selections with JavaScript for security reasons. The one technique I've seen is to mirror the path string from the file control to a hidden control. One then can do some JS validation with the hidden control value. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298151 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4