You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chris Joelly <ch...@unycom.com> on 2004/04/20 12:08:40 UTC

Turbine 2.3: ActionEvent and form with enctype="enctype="multipart/form-data"

Hello!

after migrating the turbine app from turbine 2.2 to 2.3 i have the
following "last" problem: ;-)

in my action classes i always run into the doPerform method, not into
the eventSubmit_do ... methods when i have a multipart/form-data form.

without the multipart attribute all things work fine, but i need it for
file uploads...

has anybody an idea whats going wrong?

thx, Chris

btw: is the exception handling in 2.3 better than in 2.2 when a user
tries to upload a file BIGGER than configured with
TurbineResources.properties?

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

Zivilisation ist die unbegrenzte Vervielfachung von unnötigen Notwendigkeiten.
		-- Mark Twain


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine 2.3: ActionEvent and form with enctype="enctype="multipart/form-data"

Posted by Brian Lawler <br...@tribenetwork.com>.
Chris-

Don't know about the event trigger problem, but...

On Apr 20, 2004, at 3:08 AM, Chris Joelly wrote:

> btw: is the exception handling in 2.3 better than in 2.2 when a user
> tries to upload a file BIGGER than configured with
> TurbineResources.properties?
>

No.  It would appear to be exactly the same as before, with the 
exception that the File Upload code is now located in 
commons-fileupload.  However, the trick that I am using now is to 
specify a max upload size that is my desired max * 10 and I am 
detecting in my field validation code that a file is larger than it 
should be, and reporting that back using our standard method of field 
validation.  We are only handling image uploads at this point, so it is 
unlikely that someone would miss our limit by an order of magnitude, 
and if they do they just get that nasty page that currently comes back. 
  However, in either case we have to upload the file before knowing how 
big it is so this really isn't any extra work (right?)

I had at one point changed the upload service to actually add an 
Exception to the parameter parser in place of a FileItem, so that I 
could detect within my field validation that the file was too large, 
but this code ultimately died due to other problems.

Hope this helps...

-Brian


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org