You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by "Thomas Vandahl (JIRA)" <ji...@apache.org> on 2009/09/10 09:07:57 UTC

[jira] Resolved: (TRB-10) Make Intake file uploads work in fulcrum

     [ https://issues.apache.org/jira/browse/TRB-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl resolved TRB-10.
-------------------------------

    Resolution: Later
      Assignee: Thomas Vandahl

The issue is now handled by an instanceof test in getParam() (Thanks to Siegfried). This might not be the best of all solutions but it allows for the BaseValueParser to be type-agnostic.

>  Make Intake file uploads work in fulcrum
> -----------------------------------------
>
>                 Key: TRB-10
>                 URL: https://issues.apache.org/jira/browse/TRB-10
>             Project: Turbine
>          Issue Type: Improvement
>          Components: Core, Fulcrum
>    Affects Versions: Core 4.0
>            Reporter: Scott Eade
>            Assignee: Thomas Vandahl
>            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.