I am trying to create a custom connector with an action that sends multipart/form-data with a parameter that is a file and receives JSON for the response. But I am unable to get the correct format for the file parameter. Flow is sending the binary contents of the file, but not setting the filename or the Content-Type. Here is the JSON for the connector:
Any ideas of how to set this up?
{
"swagger": "2.0",
"info": {
"title": "Dynamic Signal",
"description": "Your Mobile-First Company Communications Platform. Keep employees informed and engaged. Increase productivity and empower advocacy. This Connector allows for fluid communication between MS Flow and Dynamic Signals APIs. Full documentation available at dev.voicestorm.com",
"version": "1.0"
},
"host": "crunchgranola.dsinitech.us",
"basePath": "/v1",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/post/{id}/image": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"$ref": "#/definitions/successResponse"
},
"headers": {
"Content-type:": {
"description": "Content-type:",
"type": "string"
}
}
}
},
"summary": "Upload an image to a post",
"description": "Sets the post image via MIME-multipart upload.",
"operationId": "UploadImageToPost",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"parameters": [
{
"type": "string",
"format": "uuid",
"description": "The post ID",
"x-ms-summary": "ID",
"required": true,
"in": "path",
"name": "id"
},
{
"name": "file",
"in": "formData",
"required": true,
"type": "string",
"format": "file",
"x-ms-summary": "File Content"
},
{
"name": "filename",
"in": "formData",
"required": true,
"type": "string",
"x-ms-summary": "File Name"
},
{
"name": "Content-Type",
"in": "formData",
"required": true,
"type": "string",
"default": "image/jpeg",
"x-ms-summary": "Content Type"
}
]
}
}
},
"definitions": {
"successResponse": {
"type": "object",
"description": "A simple response indicating the action was carried out successfully",
"x-ms-summary": "",
"properties": {
"code": {
"type": "string",
"description": "A value of \"success\" indicates a successful operation",
"x-ms-summary": "Code"
}
}
}
},
"parameters": {},
"responses": {},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
}
},
"security": [],
"tags": []
}
I am testing this with the following flow:
