Invalid multipart payload format while uploading img/pdf

hi team, i use kibana 7.10.2 and create endpoint which uploads files as FormData.
My code snippet is like:

      {
        path: '/api/soc_services_audit/attach_files',
        options: {
          body: {
            output: 'stream',
            accepts: ['image/jpeg','multipart/form-data','application/json','text/plain'],
            maxBytes: 500000,
            multipart: true
          },
        },
        validate: {
          body: schema.object({
            files: schema.any()
          }),
        }
      },
      async (context,request,response) => {}
)

my error is like this:

{
  statusCode:400,
  error:"Bad Request",
  message:"Invalid multipart payload format"
}

may anybody help with that issue?

can anybody answer?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.