Return-Path: X-Original-To: apmail-struts-dev-archive@www.apache.org Delivered-To: apmail-struts-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 417DFD807 for ; Thu, 15 Nov 2012 04:20:30 +0000 (UTC) Received: (qmail 28253 invoked by uid 500); 15 Nov 2012 04:20:29 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 28041 invoked by uid 500); 15 Nov 2012 04:20:29 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 27993 invoked by uid 99); 15 Nov 2012 04:20:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 04:20:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mfncooper@gmail.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 04:20:20 +0000 Received: by mail-ie0-f176.google.com with SMTP id k11so1989205iea.35 for ; Wed, 14 Nov 2012 20:19:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=S+AuUlAhjWarGipeMz/zpsPKcSzuyoBH4lv4FN2Lm6k=; b=xE4j3zqLHUlppLbQU2lvW1SKrMS1jc1KyWxwL4ExgpJvq2W3IQSMUXjIFUIa3uCnKA jNtSqSxqFjnJiuH6GwXsettZJe37pb4e+AbaCIeVPgUQ8S67lpv6RA426yEyxXeRr1/B K7C4bKR8iraVaYoPFGUB3x0XGo/7qyb6Gs3VOIyzTi/YCVtE5AWTbmrbDSjPn91ZUiaP 4jecYS/P2DDDrfbVHRa0T4XO9RbWszzMSPJkubc/4p0Sox4seJbsJD2Fq39szzrmF8RJ sAmzXmb9gMhOLykYrSTesEP6+VmYWlCGeVX1F1+UtuosyPSuoGEUN2OCHNhzkYSdZzRI JePw== MIME-Version: 1.0 Received: by 10.50.33.233 with SMTP id u9mr1235464igi.39.1352953199237; Wed, 14 Nov 2012 20:19:59 -0800 (PST) Sender: mfncooper@gmail.com Received: by 10.64.41.69 with HTTP; Wed, 14 Nov 2012 20:19:59 -0800 (PST) In-Reply-To: References: Date: Wed, 14 Nov 2012 20:19:59 -0800 X-Google-Sender-Auth: h4VtiwIUEJc_fcZTPx5JfGbxueA Message-ID: Subject: Re: processing of multipart request From: Martin Cooper To: Struts Developers List Content-Type: multipart/alternative; boundary=f46d044630d2d6989d04ce80f644 X-Virus-Checked: Checked by ClamAV on apache.org --f46d044630d2d6989d04ce80f644 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Nov 12, 2012 at 4:39 AM, Fastupload wrote: > To who maybe concern, > > I just notice struts2 framework parses multipart/form-data requesting into > a temporary file, and marshal a java.io.File object for struts2 action > regarding file input of multipart-form data request. also the framework > parses all files in request and then make a filter rule in > FileUploadInterceptor.java. And finally, framework clean temporary files > after action is invoked. > > Following the processing, there are three disadvantages: > 1, use temporary file makes low performance > 2, redundancy operation -- clean up temporary file > 3, struts action only supports java.io.File class to represent a uploading > file in multipart/form-data request. > 4, filter all file after parsing has been done, the action may be prior to > interceptors. > All of those could be addressed without switching to a new file upload framework, since Commons FileUpload supports them. It would seem to make more sense to me to expand what we have already, rather than throw it out and replace it with something new and untested (i.e. not in widespread Struts production usage). Could you guys have a look into *fastupload* open source project in > https://sourceforge.net/projects/fastupload. Right now it is the fastest > form-based upload parsing component in java area. it makes a significant > performance improvement and advance features, such as, > 1, 2.x faster than Apache Commons FileUpload in stream method. certainly, > it's 5.x faster than apache commons file upload in disk method. > Please provide some links to the benchmarks you've run to measure those things, and the constraints you used when measuring them. > 2, filter boundaries with determining MIME and file name in advance. > > > > In fastupload-0.4.7 version, it has released some codes that work with > struts2 framework, enable parsing files with it in struts2 framework. To > improve features of struts2 multipart/form-data request, Could you consider > to integrate *fastupload* source code into struts2 framework. incurring > struts2 supports both *fastupload* and ASF commons file upload? > I can't find any reference to Struts in the codebase you provided a link to. Perhaps you could provide a reference to the Struts related code? The right approach to integration is basically what Wes originally suggested. It should be usable as a plugin. If changes need to be made to Struts to support that, you can propose those changes for consideration. If they're accepted, then people will be able to choose your fastupload as an alternative to what's there today, if they choose to do so for their application. By the way, your code is hard to check out because of the messed up repository structure, and there are also several typos even in the interface and method names. Those things detract from any confidence in the quality of your code, so you might want to clean them up. -- Martin Cooper best wishes, > Link Qian > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --f46d044630d2d6989d04ce80f644--