Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 12105 invoked from network); 22 Jun 2009 14:26:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jun 2009 14:26:35 -0000 Received: (qmail 88295 invoked by uid 500); 22 Jun 2009 14:26:45 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 88192 invoked by uid 500); 22 Jun 2009 14:26:45 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 88182 invoked by uid 99); 22 Jun 2009 14:26:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 14:26:44 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [92.249.128.189] (HELO relay01.digicable.hu) (92.249.128.189) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 14:26:33 +0000 Received: from [78.131.55.71] (helo=gwyll.mine.nu) by relay01.digicable.hu with esmtpa id 1MIkTM-0001br-Qc for ; Mon, 22 Jun 2009 16:26:12 +0200 Received: from mail.ratesoft.hu (root@mail.ratesoft.hu [81.182.250.176]) by gwyll.mine.nu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MEQAqo011267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 22 Jun 2009 16:26:10 +0200 Received: from developer03 (developer03.ratesoft.local [192.168.0.61]) by mail.ratesoft.hu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MEQ9ad016534 for ; Mon, 22 Jun 2009 16:26:09 +0200 From: =?iso-8859-2?Q?Jantek_Bal=E1zs?= To: Subject: commons.fileupload: only memory usage Date: Mon, 22 Jun 2009 16:30:46 +0200 Message-ID: <71C0C4BF02E8465386DC4922AE849290@ratesoft.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcnzRghEN8wylOj0Qvm0XTC8R7vAKQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: by amavisd-new X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gwyll.mine.nu X-Original: 78.131.55.71 X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=1.4 required=4.0 tests=AWL autolearn=ham version=3.2.5 Hi! I would like to ask if it is possible to configure a fileItemFactory so that it never uses the file system. I would need a kind of MemoryFileItemFactory.. :-) My problem is that my webapp has no access to the file system. If i set a large threshold on a DefaultFileItemFactory of a DiskFileItemFactory, i always get permission exceptions. I would like to separate the uploaded small (xml) files so that my servlet doesn't hit the file system. Do you have any ideas? Thanks! jb ********** DiskFileItemFactory factory = new DiskFileItemFactory(); // Set factory constraints factory.setSizeThreshold(1024 * 1024); factory.setRepository(new File("tempfile.tmp")); // Create a new file upload handler ServletFileUpload upload = new ServletFileUpload(factory); try { List items = upload.parseRequest(request); // PERMISSION EXCEPTION HERE --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org