[ https://issues.apache.org/jira/browse/TRB-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491311 ]
Scott Eade commented on TRB-10: ------------------------------- Okay, so I should run svn update before making that last comment. fulcrum-parser does now keep a record of the uploaded files, but these are intermingled with the rest of the parameters. The remaining problem is that a getString() o(or for that matter a get() or a getParam()) for a file item results in a ClassCastException. We either need to follow the turbine 2.3 model of maintaining the list of uploads separately or ensure that getString() & getParam() cater for FileItems. I will commit a failing test case for this. > Make Intake file uploads work in 2 3 1 > --------------------------------------- > > Key: TRB-10 > URL: https://issues.apache.org/jira/browse/TRB-10 > Project: Turbine > Issue Type: Improvement > Components: Fulcrum, Turbine 2.3 > Affects Versions: Core 2.3.2 > Reporter: Scott Eade > Priority: Minor > > init() in FileItemField invokes the parser's containsKey() method to > determine whether the incoming request contains a file item for the > FileItemField. The containsKey() method that gets invoked is inherited by > DefaultParameterParser from BaseValueParser and searches the "parameters" > attribute also inherited from BaseValueParser. However, file items are kept > in DefaultParameterParser's "fileParameters" attribute. Hence, containsKey() > never reports "true" for file items. > My suggested fix is to simply add a containsKey() function to > DefaultParameterParser, which also searches "fileParameters": > public boolean containsKey(Object key) > { > return super.containsKey(key) || > fileParameters.containsKey(convert((String)key)); > } > With this fix, file uploads for file upload fields marked as "required" work. > Scarab issue TTWS65 was created by Thomas Lopatic (thomas at lopatic dot de). -- 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]