• 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: Can I use WOMultipartIterator API in WOComponent action methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I use WOMultipartIterator API in WOComponent action methods?


  • Subject: Re: Can I use WOMultipartIterator API in WOComponent action methods?
  • From: "Shravan Kumar. M" <email@hidden>
  • Date: Fri, 08 Aug 2008 12:23:13 +0530
  • Organization: effigent India Pvt Ltd.,

Thanks for your response Lachlan Deck.

You are right! I can use context().request().formValues(), but as I said in my earlier email, I get image data from request which I cannot read from context().request().formValues() and is only available by iterating over WOMultipartIterator API. Hence, it is must for me to grab request data using WOMultipartIterator API.

---------------------------------------------------------------------------------------------------

>From WebObjects API:

public class WOMultipartIterator
extends java.lang.Object

This class represents the content of a multipart/form-data HTTP request.
You get the iterator for such a request by calling multipartIterator on the WORequest object. Once you have this object, you get WOFormData objects by repeatedly calling nextFormData, until it returns null.
Each WOFormData allows you to introspect the sub-headers, as well as either look at the form value(s) or grab the entire content of the part as an InputStream subclass.
The InputStream subclass is a WOFormDataInpuStream and can be used to stream large file uploads to disk (or elsewhere).
The WOMultipartIterator should NOT be used with WOFileUpload component actions. It may be used with component actions where there is no WOFileUpload, and it may be used in DirectActions.

---------------------------------------------------------------------------------------------------

>From above API, I get to know I can use WOMultipartIterator API in either component actions/ direct actions.
Thank You
Shravan Kumar. M
effigent India Pvt., Ltd.,
----------------------------------------


Lachlan Deck wrote:
Hi Shravan,

On 07/08/2008, at 2:36 PM, Shravan Kumar. M wrote:

I would like iterate through this api, and retrieve form key-value pairs for my business logic processing. Basically I use a third party UI interface which obviously sends the data across to the server encoded in the HTTP Request and this data has file data to be uploaded.

context().request().formValues()

So, can I iterate through WOMultipartIterator API in WOComponent action methods and retrieve data from this api.

I don't see why not. That's what the api says.

with regards,
--

Lachlan Deck



 _______________________________________________
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

References: 
 >Can I use WOMultipartIterator API in WOComponent action methods? (From: "Shravan Kumar. M" <email@hidden>)
 >Re: Can I use WOMultipartIterator API in WOComponent action methods? (From: Lachlan Deck <email@hidden>)
 >Re: Can I use WOMultipartIterator API in WOComponent action methods? (From: "Shravan Kumar. M" <email@hidden>)
 >Re: Can I use WOMultipartIterator API in WOComponent action methods? (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Inheritance and relationships
  • Next by Date: Re: Entity Modeler: Reverse engineering of a FrontBase db?
  • Previous by thread: Re: Can I use WOMultipartIterator API in WOComponent action methods?
  • Next by thread: work almost good on a leopard server with WO5.4, but fails as war on tomcat
  • Index(es):
    • Date
    • Thread