Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Sep 26, 2024 04:44 PM
I have an API script like the below. This works fine as a scripting Extension (right panel) but when I place the script into an Automation Script step, Airtable gives the error "ReferenceError: FormData is not defined".
Any ideas why it would work in one place but not the other?
const myHeaders = new Headers();
myHeaders.append("Authorization", apiKey);
const formdata = new FormData();
formdata.append("file", fileBlob);
const requestOptions = {
method: "POST",
headers: myHeaders,
body: formdata
};
let postResponse = await fetch(apiUrl, requestOptions);
0 Replies 0
