struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schachter, Michael" <MSchach...@Bluestone.com>
Subject RE: Volunteer: File Upload/ Multipart form handling
Date Wed, 04 Oct 2000 03:22:25 GMT
Ok, I've taken everybody's concerns into consideration as of this point this
is what I'm planning to do:

1) No MultipartActionForm interface.  Not sure why I proposed that in the
first place.  Defining setter and getter methods with type "java.io.File" in
your ActionForm implementation is good enough.

2) Make sure there's a sure-fire rollback mechanism in case of an invalid
form, exception, maybe work with ValidatingActionForm

3) As for configuration issues, as for now I'm proposing the following
init-parameters in web.xml under the "action" servlet:

readBufferSize = bytes read from the post at a time, defaults to something

writeBufferSize = bytes written to [either memory or disk] at a time,
defaults to something

maxFileSize = a maximum upload file size (with a trailing "K", "M", or "G"
no suffix means "bytes"), defaults to something

storage = {disk | memory}  whether to hold the upload in memory or use a
FileOutputStream (or something like that) to write to a temporary file,
which leads to the next config option, defaults to "disk"

tempDirectory = if storage="disk", tempDirectory is where the temporary file
is stored, to do with you want with it.  you retrieve a handle to the temp
file/s using it's proper getter method in your ActionForm implementation,
probably default it to the current working directory for now

Probably get cracking on this tomorrow morning, thank you for all your help
guys.  Email me if you'd like to know how I specifically am planning to
implement all this.

Mime
View raw message