This sounds a lot like some of the bugs with multipart/form-data that are in
the bug database.
Take a look at:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=526
I've been using multipart/form-data uploads and they have been working after
fixing a few bugs in the older version of the TDK we are using. If you are
using an older version of the TDK, you may want to consider upgrading.
Don't forget to set:
services.TurbineUploadService.automatic=true
You might also want to play with your upload size threshold:
services.TurbineUploadService.size.threshold=1048576
This is the threshold of the size of your file upload before it is written
to disk.
Note that a file can either be cached in memory or written to disk, and each
case needs to be handled accordingly.
FileItem fileitem = data.getParameters().getFileItem("image");
if (fileitem == null)
{
throw new Exception("No Image specified");
}
File file = fileitem.getStoreLocation();
if (file == null)
{
InputStream is = fileitem.getStream();
FileOutputStream fos = new FileOutputStream(destPath);
// copy the input stream to the output stream...
}
else
{
file.renameTo(new File(destPath));
}
Hope it helps,
-Myron
> -----Original Message-----
> From: Gareth Coltman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 9:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Upload service again
>
>
> OK thanks,
>
> More info:
>
> My form uses an image button to submit (shouldn't make any
> difference but...)
>
> There are two file elements in my form.
>
> As I said parsing parameters works no problem if a don't specify
> a file. When I do, all I get is Y's in the console. At the mo I
> haven't got a decent IDE to debug so I am stuck.
>
> Gareth
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]