[ https://issues.apache.org/jira/browse/LABS-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simone Gianni resolved LABS-194. -------------------------------- Resolution: Fixed First step implemented, if a setParam...(FileItem item) is found on a web handler, the corresponding uploaded file is passed. This makes handling of uploaded files possible from a web handler. Now, we need automatic handling of it when the files maps directly to a bean property, both in input and output. Anyway, this is a very hard topic : - How to render a file? With a link to download it? Being ShowBean a producer and not a handler, where should this download link point to? This could be easily solved if unification of producers and handlers were in place (see LABS-192). - How to handle a file upload in a stateless environment? While string values are "stored" on the client and passed each time the form is submitted, we don't want (and cannot have) this happening for files, so they must be stored somewhere on the server in a stateful manner, which then involves cleaning it up. - In both cases, in a bean, we will want to store the raw data (as an input stream probably), but filename and mime-type are useful informations we want to store somehow, and reuse for output. I'm going to defer automagic handling of files since currently not enough use cases have emerged to understand properly where the "pareto line" lays. > WEB: provide easier file upload functionality > --------------------------------------------- > > Key: LABS-194 > URL: https://issues.apache.org/jira/browse/LABS-194 > Project: Labs > Issue Type: New Feature > Components: Magma > Reporter: Simone Gianni > Assignee: Simone Gianni > > Using commons-fileupload and permitting a setParam with a java.io.File > argument could be a starting point. > Then, also provide infrastructure in foundation beans to denote a bean field > taking a file (or a stream + metadata), in foundation validation for > validating it (maximum size, accepted mime types etc..), and in forms and > showbean to properly display and handle it. > Also, it should be able to use a file as an image, displaying it during the > showbean. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]