Reputation: 1340
I have created AWS API-Gateway and I am trying to upload an image using Postman but I received an error of Multipart: boundary not found.
I have tried below solution for this issue whereas I created model for API as follows:
Model name: fileupload
Content type: image/png
Model schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "UserAccountUpdate",
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"avatar": { "type": "string" },
"username": { "type": "string" }
}
}
}
}
But, this didn't worked.
I expect my image to get uploaded but it receives an error of Multipart: boundary not found.. Please Help me to resolve this issue, Thanks.
Upvotes: 1
Views: 1581
Reputation: 516
I have added "Content-Type:method.request.header.Content-Type" in http headers. Then it is working.
Upvotes: 1
Reputation: 635
Go to the API Gateway settings tab for your API and add "multipart/form-data" to the "binary media types" section:
You have to use HTTP Proxy integration and for Content Handling , choose Passthrough.
Upvotes: 3