You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by "Scott Eade (JIRA)" <ji...@apache.org> on 2007/04/24 08:34:15 UTC

[jira] Commented: (TRB-10) Make Intake file uploads work in 2 3 1

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

Scott Eade commented on TRB-10:
-------------------------------

So 2.3 handles this correctly.  The fulcrum components are a little convoluted when it comes to ParameterParser, UploadService, etc.  The current situation is that fulcrum-parser's DefaultParameterParser checks if fulcrum-upload is configured and if so causes it to deal with any included files.  It does not however retain a record of the uploaded files, so once again, keySet() and containsKey() will not include FileItems.  These two supposedly independent components are reasonably tightly coupled (though parser can be used without upload) - it may make sense to tie them in a little further by having upload retain a record of the uploaded files in much the same way as in 2.3.

>  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: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org