Thanks for the advice. I have a new problem.

I am doing this:

 if (aContext.request().isMultipartFormData()){


             WOMultipartIterator wmi =
aContext.request().multipartIterator();
             WOFormData data = wmi.nextFormData();
             while (data != null) {
                 if ( data.isStreamValid()) {
                     System.out.println(data.toString());

                     try {
                            NSData myFile = data.formData();

                           this.workWithTheFile(myFile);

                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }

                 }

                 data = wmi.nextFormData();
             }

//



The method "this.workWithTheFile(myFile)" used to work  with WOFileUpload
perfectly fine, but right now its throwing an error.

System.out.println(data.toString()) prints:
 WOFormData 4 isStreamValid true headers: {content-disposition = ({form-data
= <class com.webobjects.foundation.NSData (offset=0, length=9,
data=[102]'f', [111]'o', [114]'r', [109]'m', [45]'-', [100]'d', [97]'a',
[116]'t', [97]'a')>; filename = "myXMLFile.xml"; name = "File0"; });
content-type = ("text/xml"); }

The main problem is that "NSData myFile = data.formData()" is returning
null. How should I handle the WOFormData to convert it into a valid NSData?

Thank you for your time.


-- 
Fabián Montealegre Carvajal
 _______________________________________________
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