Re: WOMultipartIterator
Re: WOMultipartIterator
- Subject: Re: WOMultipartIterator
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 11 Aug 2003 10:18:50 -0500
I am indeed looking at that example, and basing my code off that example.
But I need to do a bit more than that code does, and when adding on
functionality, I became confused as to the best (or acceptable!) way to do
it. The questions below were the ones that came up.
But, I realized I can do what i need just using the WOMultipartIterator, so
while I still don't know if it's safe to use formValueForKey and
formValueKeys in conjunction with the WOMultipartIterator, since I don't
need to, I'm avoiding it.
--Jonathan
At 12:50 AM 8/8/2003 -0700, Hsu wrote:
Why not just look at the FileUpload example? Specifically, look at the
DirectAction/ProcessFileUploadWithIteratorAction
Karl
On Thursday, August 7, 2003, at 11:16 AM, Jonathan Rochkind wrote:
I am trying to use WOMultipartIterator in a direct action (well, really
in a custom request handler action, but it behaves like a direct action
for these purposes). For a file upload.
I am confused as to what I have to do to avoid reading the entire file
into memory. I've read over the documentation, and the "What's New in
5.2" document many many times, but I'm still confused--it's complicated.
I have a form that contains a file upload. It also contains other form
key/values BEFORE the file upload. I want to read these key/values
before I deal with the file upload. I also, of course, want to make sure
the entire file upload is NEVER read into memory, for instance as part of
the WORequest.
How do I access these non-file form values? Can I use formValueForKey,
without worrying this cause my file to be read into memory? Can I call
formValueForKey on my key values multiple times, without worrying this
will cause my file to be read into memory? Can I call formValueKeys()
without causing my file to be read into memory? Am I better off just
using the WOMultipartIterator iterator to get my non-file form values,
like I'm going to use it later to get my file form values? Am I even
_allowed_ to combine a WOMultipartIterator with calls to
formValueForKey/formValueKeys for the same WORequest?
Also, headerValueForKey() and headerKeys()... I'm okay calling these as
much as I want however I want, without worrying about it causing the
uploaded file to be read into memory, right? For instance, to get the
content-length header.
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
we are the tools
not the craftsmen
and if we succeed
we will be less than the result of our work
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.