Hi ,
I have a requirement - where i need to send create csv file based on incoming message - But file will be created in API only when we use the keys and value (used in Body).belwo is the screenshot where we are directly uploading the file from postman to API

Here dataFile is the file.
I have gone thru the blogs
https://blogs.sap.com/2018/02/09/the-marriage-between-form-data-and-sap-cloud-platform-integration/
and tried below in content modifier in Body :

content Modifier - header and Body


--cpi Content-Disposition: form-data; name="datafile"; filename="anurag.csv" Content-Type: application/vnd.ms-excel ${property.body} --cpi Content-Disposition: form-data; name="cmisaction" createDocument --cpi Content-Disposition: form-data; name="propertyId[0]" cmis:objectTypeId --cpi Content-Disposition: form-data; name="propertyValue[0]" cmis:document --cpi Content-Disposition: form-data; name="propertyId[1]" cmis:name --cpi Content-Disposition: form-data; name="propertyValue[1]" Anurag4 --cpi--
and after that i hava e used the groovy script :
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message)
{ //Body def body = message.getBody(String); body = body.replaceAll("\n", "\r\n");
body = """--cpi\r\nContent-Disposition: form-data; name="envelope"\r\n\r\n\r\n""" + body + """\r\n\r\n--cpi--""" message.setBody(body); return message; }
when i checked in trace i am getting result like :
and after that error is - 405 method not alowed