Martin, sorry, I just noticed the depricated FileUpload code in the struts does some of this.

http://cvs.apache.org/viewcvs/jakarta-struts/src/share/org/apache/struts/upload/

-Mark

Mark R. Diggory wrote:

Martin,

This could probably be more appropriate for Commons Developer, but:

Any thoughts on a "pull" model Uploader for Commons Upload? Something that might return an Iterator over the multipart request stream in place of a List of processed FileItems? Just because its a design pattern taken advantage of in COS doesn't mean that its proprietary and can't be used in other tools like Commons FileUpload. There are many significant examples of the application of such a design pattern.

Iterator parseRequestIterator(javax.servlet.http.HttpServletRequest req)

I'd imagine something that returned an iterator of FileItem's instead of a List. Then FileItem's InputStream methods could stream directly from the request if it was a first pass or possibly draw from a cache of the contents in a temp file.

This would be something that could be used easily in collaboration with other libraries such as JAXP/SAX or other streaming libraries.

Another idea is to support some sort of "Filter" pipelining such that "MultipartFilter" could be written to process the InputStream prior to the creation of the temp file in the Repository...

Request Stream
--> MultipartFilter (could match on param name) lots of cool custom processing, SAX, XSLT etc.)
--> InputStream
--> File


-Mark


Martin Cooper wrote:


On Tue, 2 Dec 2003, Mark R. Diggory wrote:


I've been using the COS library, its a bit lower level but currently
meets my streaming needs for things like DOM'ing and XSL transforming
straight off the request input stream.

http://www.servlets.com/cos/index.html



With file upload capability built into Struts, I'm curious as to why you would choose to use a different library?

One thing to watch out for with the COS library is the license. If you use
it in a commercial application, you are *required* to purchase copies of
(the latest edition of) Jason Hunter's book for every developer. See:


http://www.servlets.com/cos/license.html

Strange but true...

--
Martin Cooper



-Mark

K.C. Baltz wrote:


One of the example webapps included with Struts 1.1 is struts-upload.
I've based my code off that.  You'll probably want the source
distribution of Struts to see how it's done.

K.C.

Ravi Krishna wrote:


Hey Guys , I want to upload data of wave , jpeg and MPEG formats .Is
there
any tag in struts which I can use in my application to achieve this???

Your response is highly appreciated


Regards/Ravi Krishna



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- Mark Diggory Software Developer Harvard MIT Data Center http://www.hmdc.harvard.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to