Hi-

I haven't actually seen this message go out to the mailing list, but I've
come a bit further in implementing this - which, naturally, throws up
different problems :-)

So far I have 1) extended FormUtil to handle file uploads (using Apache
Commons FileUpload), and 2) extended FormOpen to take an "enctype"
parameter (because forms containing file uploads need multipart/form-data).

At this point, the form submit causes an "o.a.w.h.f.CsrfProtectionFilter -
Incorrect X-XSRF-TOKEN param with value 'null' received for null" error,
even though the CSRF token is present and submitted. My guess is that the
form handling by the FileUpload library somehow interferes with CSRF token
handling, although I can't imagine how.

Can anyone provide some idea of what might be (or might not be) going on?

Thanks
Ulf

---------- Forwarded message ---------
From: Ulf Dittmer <ulf.ditt...@googlemail.com>
Date: Wed, Jul 3, 2024 at 9:58 AM
Subject: WikiFormsPlugin with file input?
To: <user@jspwiki.apache.org>


I want to implement a simple file upload solution for users of a JSPWiki
site, and was wondering what the easiest way to go about this might be. The
FormInput plugin can create file input elements, but obviously that won't
work as the parameters are passed in a Map<String,String>.

Has anyone implemented something like this, or is aware of
a WikiFormsPlugin extension that can do this?

The end result would be a simple way for users to upload files along with
keywords for a simple file storage and retrieval solution. The files would
not be associated to particular pages, so using attachments would not
really work.

Thanks
Ulf

Reply via email to