Hi all,

I have some problems regarding file uploads with WO 5.4.3. When I submit the form, my action method is called, but the form values get lost some where in the request processing. The page is very simple, only a text field and a file upload inside a form and a submit button. Every thing is binded correctly and it has worked with WO 5.3. I'm using WONDER 5.0.0.8764 for WO 5.4. The application is running in direct connect mode, and session id's are stored in a cookies... dont know if this has some importance.

The problem mentioned by William Hatch (Subject: WOFileUpload and 5.4, from 10/30/08) seems to be similar, but there is was solution posted. As Chuck mentioned, form values can get lost when the encoding changes during the request, this seems to happen in my case, but I do not understand why?

Here is a log of the request in dispatchRequest() and in the same thread later in takeValueFromRequest():

Dec 16 02:01:46 MyApplication[3004] DEBUG NSLog - dispatchRequest: <er.extensions.appserver.ERXRequest (<er.extensions.appserver.ERXRequest httpVersion=HTTP/1.1 headers={accept=[text/xml,application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5], accept- encoding=[gzip, deflate], accept-language=[en-us], connection=[keep- alive], content-length=[851656], content-type=[multipart/form-data; boundary=----WebKitFormBoundaryoAlLNzXKfp0pQVgV], cookie=[wosid=JqNtBIQBjJoJDvcBQt4bAw; woinst=-1], host=[192.168.4.35:3004], referer=[http://192.168.4.35:3004/cgi-bin/WebObjects/MyApplication.woa/wo/6.5 ], user-agent=[Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en- us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/ 525.27.1]} content-length=851656 cookies=null userInfo={} storePageInBacktrackCache=true >) method=POST uri=/cgi-bin/WebObjects/ MyApplication.woa/wo/7.5 defaultFormValueEncoding=UTF-8 formValueEncodingDetectionEnabled=NO formValueEncoding=UTF-8 formValues={5.1 = ("Test 1"); 5.3.mimetype = ("image/jpeg"); 5.3.filename = ("DSC00033.JPG"); 5.3 = (<class com.webobjects.appserver._private.WOInputStreamData (stream com.webobjects.appserver.WOMultipartIterator$WOFormData $_woformdatainputstr...@ee68d1 of length 0), has NOT been accessed>); } >


Dec 16 02:01:46 MyApplication[3004] DEBUG NSLog - takeValuesFromRequest: <er.extensions.appserver.ERXRequest (<er.extensions.appserver.ERXRequest httpVersion=HTTP/1.1 headers={accept=[text/xml,application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5], accept- encoding=[gzip, deflate], accept-language=[en-us], connection=[keep- alive], content-length=[851656], content-type=[multipart/form-data; boundary=----WebKitFormBoundaryoAlLNzXKfp0pQVgV], cookie=[wosid=JqNtBIQBjJoJDvcBQt4bAw; woinst=-1], host=[192.168.4.35:3004], original_context_id=[7], referer=[http://192.168.4.35:3004/cgi-bin/WebObjects/MyApplication.woa/wo/6.5 ], user-agent=[Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en- us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/ 525.27.1]} content-length=0 cookies=null userInfo={} storePageInBacktrackCache=true >) method=POST uri=/cgi-bin/WebObjects/ MyApplication.woa/wo/7.5 defaultFormValueEncoding=ISO8859_1 formValueEncodingDetectionEnabled=NO formValueEncoding=ISO8859_1 formValues={} >

I have tried to set the form value encoding to UTF-8 in the dispatchRequest() method with no luck, I also tried WOFileUpload and ERXWOFileUpload.
Any clues or ideas to fix it?

Regards,
--
Sergio
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to