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.

-Steve

>What if you change the encoding type using javascript?
>
><script>
>UploadButton.Attributes.Add('onclick','javascript:document.forms[0].enco
>ding = "multipart/form-data";')
></script>
>
>http://delphi.about.com/od/adptips2004/a/bltip0704_4.htm 
>
>M!ke
>
>Andy,
>
>Yes, I am having the exact same problem. When a form is in a Ajax UI
>element (like cflayout and cfdiv) it is submitted asynchronous. The
>encoding type is set to application/x-www-form-urlencoded and it needs
>to be multipart/form-data. According to Ray Camden there is no way
>around this and it is not possible to use cffile to upload a file
>asynchronous.
>
>I have had some suggestions to use a JavaScript or a flash based upload
>but I have not had a chance to try anything.
>
>I think that if you try to use <cfwindow> you will have the same problem
>because it is still part of the page and will submit asynchronous.
>
>I think it is kind of crazy to think that with CF8 we have these new
>tags to help with UI development (like cflayout and cfdiv) but you
>cannot upload a file when using them. I understand that it is because it
>is asynchronous, but I think there should be some way to do it.
>
>Who knows.
>
>-Steve 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287487
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to