Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 93188 invoked from network); 29 Jan 2003 16:19:14 -0000 Received: from mail.thetakgroup.com (206.58.216.130) by daedalus.apache.org with SMTP; 29 Jan 2003 16:19:14 -0000 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: [FileUpload] small files okay...big files not okay X-MIMEOLE: Produced By Microsoft Exchange V6.0.4712.0 Date: Wed, 29 Jan 2003 08:26:43 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [FileUpload] small files okay...big files not okay Thread-Index: AcLHszXceq8JHrYTTHi3G3pNWsifAg== From: "ANDERSON Scott" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks for your reply. Could you inform me of where I can find the code for sample applications, such as struts-upload, for ideas on how to structure my own application? Thanks. On Tue, 28 Jan 2003, ANDERSON Scott wrote: > I'm trying to use the sample code from the intro page to see if this > package will work for me: > > FileUpload upload =3D new FileUpload(); > upload.setSizeMax(MAX_UPLOAD_SIZE); > upload.setSizeThreshold(MAX_MEMORY_SIZE); > upload.setRepositoryPath(TEMP_DIR); > List items =3D upload.parseRequest(request); > Iterator iter =3D items.iterator(); > while (iter.hasNext()) { > ... > } > > I set MAX_UPLOAD_SIZE to -1 since I read that that would allow files of > any size on the javadocs. I've tried various values for > MAX_MEMORY_SIZE, but I always have the same problem: small files work > fine, but large files either get corrupted, cause exceptions, or don't > get uploaded at all. > > Anyone else have this problem before and know how to fix it? I have not experienced this problem, and I've uploaded some pretty large files (e.g. > 60MB) using this package, without problems. Struts and Turbine both use this package. You might want to take a look at sample applications, such as struts-upload, for ideas on how to structure your own application. -- Martin Cooper