Skip to main content
Answer

Invalid data for multipart attachments / arrays

  • December 28, 2022
  • 1 reply
  • 71 views

Front Developer
Forum|alt.badge.img+2

We are trying to attach 25 attachment to https://api2.frontapp.com/channels/cha_123/messages and get a 400 response. When we attach less (21 of the 25 attachments) everything goes through fine.

Best answer by Support Engineering

The limitation you experienced is enforced by the library we use internally to parse your request. The workaround for this would be to send your array properties with no index specified, i.e attachments[] instead of attachments[0].

 

You can read a bit more here: https://dev.frontapp.com/reference/attachments#send-multipart-request

 

--Maxime

1 reply

Forum|alt.badge.img+5

The limitation you experienced is enforced by the library we use internally to parse your request. The workaround for this would be to send your array properties with no index specified, i.e attachments[] instead of attachments[0].

 

You can read a bit more here: https://dev.frontapp.com/reference/attachments#send-multipart-request

 

--Maxime