You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Myron Ahn <md...@alumni.caltech.edu> on 2001/06/07 14:10:11 UTC

multipart/form-data file upload problem

I've run into a strange problem with uploading files.  (tdk-1.1a13 on
Windows 2000.)

I set services.TurbineUploadService.automatic=true, then I tried making a
multipart encoded form that uploaded a file to the server along with a few
other regular form fields.

What I found is that whenever the combined form data and file size exceeded
the threshold specified by services.TurbineUploadService.size.threshold, all
of the parameters in my RunData would be cleared out before they reached the
action handler for the form.  If the combined size of the post operation is
less than the threshold, then everything works fine.

I briefly looked at the source code for FileItem, TurbineUploadService, and
DefaultParameterParser and it wasn't obvious to me why this would happen
(however the source code I browsed was a newer revision).

The current workaround is to set:

services.TurbineUploadService.size.threshold=1048576

so that all the files I upload will be cached in memory, which is not ideal
but works for now.

Has anyone else run into this problem?  Is it fixed in the new version?  I
didn't see any mention of it in the Apache Bug Database.

Thanks,
-Myron



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


RE: multipart/form-data file upload problem

Posted by Pere Torrodellas <pt...@fihoca.com>.
This seems to be a problem I debugged and reported when TDK 1.13 became
available. It was fixed in due time, so you should try a more recent TDK
version.

Pere Torrodellas

----- Mensaje original -----
De: Myron Ahn <md...@alumni.caltech.edu>
Para: Turbine-User <tu...@jakarta.apache.org>
Enviado: jueves 7 de junio de 2001 14:10
Asunto: multipart/form-data file upload problem


> I've run into a strange problem with uploading files.  (tdk-1.1a13 on
> Windows 2000.)
>
> I set services.TurbineUploadService.automatic=true, then I tried making a
> multipart encoded form that uploaded a file to the server along with a few
> other regular form fields.
>
> What I found is that whenever the combined form data and file size exceeded
> the threshold specified by services.TurbineUploadService.size.threshold, all
> of the parameters in my RunData would be cleared out before they reached the
> action handler for the form.  If the combined size of the post operation is
> less than the threshold, then everything works fine.
>
> I briefly looked at the source code for FileItem, TurbineUploadService, and
> DefaultParameterParser and it wasn't obvious to me why this would happen
> (however the source code I browsed was a newer revision).
>
> The current workaround is to set:
>
> services.TurbineUploadService.size.threshold=1048576
>
> so that all the files I upload will be cached in memory, which is not ideal
> but works for now.
>
> Has anyone else run into this problem?  Is it fixed in the new version?  I
> didn't see any mention of it in the Apache Bug Database.
>
> Thanks,
> -Myron
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


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