1 Reply Latest reply: Feb 22, 2012 5:46 AM by 734463 RSS

    OrdHttpUploadFormData problem with setChunkedStreamingMode...

      I developed an Applet for uploading files (some of which will be hundreds of megabytes) over http to a database (through a Servlet). Because of the large files I have to set the HttpURLConnection to chunked streaming mode, like so:

      HttpURLConnection con = (HttpURLConnection) myUrl.openConnection();
      url.setChunkedStreamingMode( 4*1024*1024 );

      In the Servlet I wanted to use OrdHttpUploadFormData to make it easier to insert the files in the database tables:

      OrdHttpUploadFormData formData = new OrdHttpUploadFormData( request );

      But the parseFormData() method returns an Exception:
      java.lang.IllegalArgumentException: Buffer size <= 0

      Any ideas what causes this and/or what to do to solve the problem?

      Thanks and best regards
      Jan O