My original posting had non-working AbstractController - so here is the working one.
I has one dependency to PersistenceFilter, but you can remove that. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Aapo Laakkonen Sent: Tuesday, February 11, 2003 7:55 AM To: [EMAIL PROTECTED]; 'Peter Blakeley' Subject: RE: [Mav-user] Re: Uploading Files using maverick > Take a look at the upload process in the Punk Image > Gallery sample app. It uses a modified version of > Jason Hunter's (O'Reilly ) multipart-mime handling > code. Here is my version that Uses Jason Pell's library. Hunter's library has that ugly licence. Just extend PublicController, and override execute() method - everything else is done for you (I use throwaway2 style controllers)! If you want to access the uploaded files then just look at multipartRequest field (or you can write public getter method if you need that), eg. MultipartContent multipartContent = null; Iterator i = multipartRequest.iterator(); while (i.hasNext()) { multipartContent = (MultipartContent) multipartRequest.next(); // Do something with uploaded file! } You can also modify the code if you for example like to store files in disk, instead of memory (It might depend on how big files you are transferring). Regards Aapo
AbstractController.java
Description: Binary data
