commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prajakta nivargi <>
Subject MalformedStreamException during fileupload
Date Tue, 04 Oct 2005 03:41:21 GMT

I am trying to upload a file on a form webpage. I am using the
JakartaMultipartRequest. My application runs on a web server and symphony
My webwork fileupload interceptor looks like this:

<interceptor name="fileUpload" class="
<param name="allowedTypes">text/plain</param>
<param name="maximumSize">8192</param>

I have tried with many different MIME filetypes. The problem area is the
class The skipPreamble() method calls the
discardBodyData() method in turn. In the discard.. method the else part of
the following code snippet gets called:

if (bytesRead != -1)
tail = pad + bytesRead;
// The last pad amount is left in the buffer.
// Boundary can't be in there so signal an error
// condition.
total += pad;
throw new MalformedStreamException(
"Stream ended unexpectedly");

And that's where the problem is.

Could anybody tell me why I'm getting the MalformedStreamException no matter
which file I upload.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message