Nabeel Shaikh
Nabeel Shaikh

Reputation: 1340

multipart boundary not found - aws api gateway

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

Answers (2)

I have added "Content-Type:method.request.header.Content-Type" in http headers. Then it is working.enter image description here

Upvotes: 1

Luis Rico
Luis Rico

Reputation: 635

Go to the API Gateway settings tab for your API and add "multipart/form-data" to the "binary media types" section:

enter image description here

You have to use HTTP Proxy integration and for Content Handling , choose Passthrough.

Upvotes: 3

Related Questions