>Yeah I tried to change the encoding with JS and it do not work. It just >still errors out with this message: > >"Invalid content type: application/x-www-form-urlencoded. The cffile >action="upload" requires forms to use enctype="multipart/form-data"." > >I think that CF overrides it because it is in a AJAX UI Element. I tested >it using a normal HTML form instead of <cfform> and it works. But I need to >use a cfform for some other reasons.
I haven't looked into the CFMX 8's CFLAYOUT tag, but you the XHR object in browsers does not allow file uploading. Most of the existing JS libraries out there that offer "asynchronous" file uploading do this by actually using an IFRAME created on a the fly and posting the data to the IFRAME instead of via the XHR object. This is the way it works in the jQuery Form plug-in and I believe Prototype and Mootools use the same technique. You could use the same technique for file uploading... -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287493 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

