You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Michael Brohl (JIRA)" <ji...@apache.org> on 2019/06/05 16:55:00 UTC

[jira] [Reopened] (OFBIZ-5048) Multi Part Input Parameters not Available in Groovy Event

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

Michael Brohl reopened OFBIZ-5048:
----------------------------------

This implementation has a drawback: it wraps the FileItem into a Buffer and thus prevents easy access to the FileItem.

Is there a reason why to do this:
{code:java}
multiPartMap.put(fieldName, ByteBuffer.wrap(item.get()));{code}
instead of this:
{code:java}
multiPartMap.put(fieldName, item));{code}
Can we change this to the 2nd solution?

> Multi Part Input Parameters not Available in Groovy Event
> ---------------------------------------------------------
>
>                 Key: OFBIZ-5048
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5048
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Vikramjit Singh
>            Assignee: Jacques Le Roux
>            Priority: Major
>             Fix For: 17.12.01
>
>         Attachments: GroovyEventMultipartParametes.patch, OFBIZ-5048.patch, OFBIZ-5048V2.patch
>
>
> If form is of type enctype="multipart/form-data" and we are handling it's submission through Groovy Event then in the parameters Map Ofbiz does not set the multipart input parameters from request parameters.
> The same are available when multipart form submission is handled through service.
> The reason being the code that sets the multipart parameters in request attribute is only available in ServiceEventHandler.java and in GroovyEventHandler the multipart are never set. 
> So I have created a method getMultiPartParameterMap in the class UtilHttp.java and put the common logic in that method so that when getCombinedMap method is called from the GroovEventHandler the method also call getMultiPartParameterMap and in the ServiceEventHandler I have written a call for getMultiPartParameterMap method.
> I am attaching the Patch Kindly Verify the same.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)