• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multiple File upload read
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Multiple File upload read
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: EOs not in an EC
  • Next by Date: Re: Multiple File upload read
  • Previous by thread: Re: webobjects.mdimension.com/hudson down?
  • Next by thread: Re: Multiple File upload read
  • Index(es):
    • Date
    • Thread