Re: app-fileservices no files in Request?
Stephen Davidson <[email protected]>
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Nathan.
Hmmm, after having a good, hard look at this, it seems to be a wee bit
more complex than I thought. While your suggestions are good ones (and
I will be incorporating some of them, btw), they don't go far enough. A
HUGE chunk of the problem is no documentation, except for a few javadoc
paragraphs (see FileUploadModel) that Santunu and I wrote when initially
working on this. Solution is to beef up the documentation big time, as
well as several codefixes (including some of your patches). I have
actually started on this, but it is going to take me a couple of days.
Day job has me working on a non-Keel project at the moment, so I have to
sneak this in on my limited amount of spare time. I will have
everything wrapped up over the weekend and submitted.
In case you are wondering, my use case requires significant prep work on
the uploaded data (and parameters) before being handed over to the
FileUploadModel. As a result, I have a model sitting between the JSP
and the FileUpload preprocessing everything, and prepping all the
parameters for the FileUploadModel. Which is why I had not noticed
this little issue of FileUploadModel having some issues when called
directly by a JSP before.
I will post here when done. Btw, if you want to open a Bug Report on SF
to track this, go ahead (and post the link to the Developer's mailing list).
Btw, How come I am the first one to start working on the new Docs?????
Or is it that people are working on the stuff, but have not yet checked
in? I was looking for some examples for how to do app-fileservices.
Regards,
Steve
CC'd to the developer list as this is actually a Developer issue.
Nathan Kontny wrote:
>Stephen,
>
>So I see that the StrutsClientConnector is now instead creating instances of
>the
>BinaryWrapper in the request. I changed the FileUploadModel to look for this
>wrapper instead of the "file_data" key. Attached is the patch if you are
>interested.
>
>I also negated the logic of the file_type map, as wouldn't it be easier for
>users to specify the files that should be allowed (jpg, png, etc.) than have to
>specify every file that shouldn't be allowed? For example, the patch now has
>this:
>
>if(!filetype_map.contains(file_extension)){
> res.addError("fileType", "$wrongFileType|"+file_extension);
>}
>
>-Nate
>
>
>
>
--
Java/J2EE Developer/Integrator
Chair, Dallas/FortWorth J2EE Sig
214-724-7741