Feature Requests item #683922, was opened at 2003-02-10 15:13 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=354754&aid=683922&group_id=4754
Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Peter Levart (plevart) Assigned to: Nobody/Anonymous (nobody) Summary: Configurable upload directory in Upload component Initial Comment: First I would like to point to the bug report: https://sourceforge.net/tracker/?func=detail&atid=104754&aid=679655&group_id=4754 where I suggested a fix for multipart request decoding which makes uploading files about 50 times faster. Apart from that, frequently a web application that features file uploading via browser upload form stores uploaded files on a file system. It would be nice when "Upload" component could save uploaded temporary file in a configured directory (not a default TEMP dir) and that uploaded File object would be accessible from IUploadFile interface. This way the application would simply move (rename) the file to the correct directory within the target filesystem without the overhead of copying the file from TEMP dir. I propose the following changes: 1.) Add a method to the ApplicationServlet: public File getUploadDirectory(); That would simply return the System.getProperty("java.io.tmpdir"); but a user could subclass it and return something else. 2.) Modify RequestContext, DefaultMultipartDecoder & UploadOutputStream to pass this information further while they are being created (modify constructors). 3.) Modify UploadOutputStream to use this information to create temporary upload files in this directory. 4.) Add method to IUploadFile interface and to UploadPart class: public File getUploadedFile(); That would return null if file was uploaded into byte array (size <= 2000 bytes) or a reference to uploaded temporary file when uploaded into file (size > 2000 bytes). What do you think? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=354754&aid=683922&group_id=4754 ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
