PricingBlog

Cannot send FormData - Request Body is always empty

  • halfpast11-1460617623804051477

    Mathias

    4 hours ago

    I'm trying to convert my data (an array of uploaded image files) to FormData and send it via POST request to my API. However, I noticed the request body is always empty.

    I tried using a Formula, as well as a Custom Action that loops through the files and returns a FormData element, I tried setting the Content-Type to "multipart/form-data", tried it without Content-Type... Somehow it never ends up properly in the request body.

    It seems like Nordcraft always tries to serialize the FormData, which breaks the request.

    Nordcraft AI suggests the only solution is to create a Custom Action and manually call the API endpoint using fetch. Is this really the only way to handle multi file uploads with FormData in Nordcraft?

    Thank you!
  • jaycmpb-1460621866040430776

    Jay Campbell

    3 hours ago

    1
    👍1
  • halfpast11-1460625747596021921

    Mathias

    3 hours ago

    That worked perfectly, thank you!
    🔥1