Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Using FormData in scripts

Topic Labels: Scripting extentions
578 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,

I’m getting an error when I try to use create a Javascript FormData object in preparation for posting to an API. I would have thought FormData would have been well supported.

console.log(`Hello, ${base.name}!`);
const endPoint = new URL('https://myserver.com/jsonAPI/');
const formData = new FormData();
formData.append("user", 'tom');

const response = await fetch(endPoint.toString(), {
    method: "POST",
    body: formData,
});

console.log(response)

Getting an error saying that FormData is not defined

1 Reply 1

They mention in their docs that the FormData API is not available in Airtable Scripting: Airtable Scripting