Hi,
thanks for your answer- I already had a look at commons fileupload.
But the problem is, when I use:
HttpServletRequest request = context.getHttpRequest();
JSPWiki tells me
HttpServletRequest cannot be resolved to a type
The type javax.servlet.http.HttpServletRequest cannot be resolved.
In addition I am implementing my plugin in Eclipse and it tells me that
there is no method getHttpRequest for a wiki context.
Best regards
Benedikt
Harry Metske schrieb:
Benedikt,
in your plugin you have access to the HttpServletRequest (
HttpServletRequest request = context.getHttpRequest(); ) .
Once you have this, I think you can use many samples/tools to handle the
uploaded file, but maybe the best one is commons fileupload (
http://commons.apache.org/fileupload/using.html), this binary jar is already
in the JSPWiki distribution.
regards,
Harry
2008/10/7 Benedikt Mohrmann <[EMAIL PROTECTED]>
Hi,
my intention is to upload a file via JSPWiki, but not as an attachment.
I am trying to upload a file, thus I created a form containing a file
chooser and a submitbutton.
The goal is, that the input file is transferred to the server and then
handled by a plugin I wrote.
The plugin just puts the file as a Serializable into a database (which
already works, when I read a file from my harddisk).
But I am not yet not able to transfer the content of the file as a stream
or something like that.
Any experiences how this could work?
Best regards
Benedikt