You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michał Letyński <ml...@consol.pl> on 2008/01/03 09:54:38 UTC
FileUpload problem for empty files.
Hi.
Im using struts 2 s:file tag for uploading files. But it does not work
for empty files -> 0bytes. Temp file is not created in tomcat tmp
directory. Why ? Is it a struts bug ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: FileUpload problem for empty files.
Posted by Michał Letyński <ml...@consol.pl>.
I found that there is a Treshold parameter, here is short info:
/
"Sets the size threshold beyond which files are written directly to disk."
/This paramater is set to 0. So my attachment is not written to disk but
is keeped in memory. In struts 1 this parameters was set to 262144.
But my problem still exist (i found that in struts 1 we have the same
problem). How to recognize empty file from not existing file. When i put
not existing file for e.g
C:\temp.txt - the file have path, name and bytes[] with length0 so the
same as my empty file which exists ! Any ideas how to solve the problem ?
Michał Letyński pisze:
> Hi.
> Im using struts 2 s:file tag for uploading files. But it does not work
> for empty files -> 0bytes. Temp file is not created in tomcat tmp
> directory. Why ? Is it a struts bug ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org