Re: Multiple File upload read
Re: Multiple File upload read
- Subject: Re: Multiple File upload read
- From: Fabián Montealegre Carvajal <email@hidden>
- Date: Fri, 5 Mar 2010 11:27:40 -0600
Thanks for the advice. I have a new problem.
I am doing this:
if (aContext.request().isMultipartFormData()){
WOMultipartIterator wmi = aContext.request().multipartIterator();
WOFormData data = ""> 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 = "">
}
//
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 = "" com.webobjects.foundation.NSData
(offset=0, length=9, data="" [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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden