I'm trying to upload a .jpg file using

     <form method="post" enctype="multipart/form-data" action
="servlet/Uploader">
     <input type="file" name="logo" size="30">
     <input type="submit" value="Submit">
     </form>

The Uploader servlet instantiates a com.oreilly.servlets.MultipartRequest
object and tries to read the form data.

Netscape 6 and IE5.5 both give me an exception

java.io.IOException: Corrupt form data: no leading boundary
           at
com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:152)
           at
com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:74)
           at
com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:123)


Interestingly, IE5.5 quits at this point. Netscape, however, actually
writes a file to my temp directory called something like formpost-1. In
this file (when opened with a text editor) contains

Content-type: multipart/form-data; boundary
=---------------------------63341846741
Content-Length: 2690

-----------------------------63341846741
Content-Disposition: form-data; name="logoFile"; filename
="logoLeesCarpet.jpg"
Content-Type: image/jpeg

<unprintable characters here>

-----------------------------63341846741--


Can anyone point me in the right direction?


Joseph Polanik
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to