struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nuorteva, Kare" <>
Subject RE: File uploads support?
Date Tue, 18 Jul 2000 12:22:13 GMT


> If we wanted Struts to become file-upload-aware, one of the issues is
> "what
> do we actually want to do with the uploaded file?  The answer 
> to this is
> probably application specific (rather than general).
> Craig McClanahan

I guess it might be a better idea to design the file upload as a streaming
object or something like this (this is just a quick draft):

This class represents the file being uploaded (Blob in database/File in file
UploadedFile extends File
- mimeType

This class provides methods to copy the content of each multipart to an
MultiPartInputStream extends InputStream implements Iterator
+ copy(OutputStream)
+ getHeaders():Hashtable

Also some utility class with helper methods might be convenient.

With this kind of a framework it should be quite easy to design and
implement own DataBean to handle file upload related functionality.

Kare 8^)

Kare Nuorteva, Software Engineer
Satama UK Ltd
mobile +44 (0)7989 852 865 

View raw message