Hey everyone. I have a public URL link that I'm trying to use to upload to an airtable attachment field with airtable scripting. This is my code (the URL is obtained from an API call response):
Problem uploading attachments from public URL
"
let existingAttachments = recordA.getCellValue('attachmentsA');
let updatedAttachments = existingAttachments ? [...existingAttachments, { filename: fileName, url: responseData.pdf }] : [{ filename: fileName, url: responseData.pdf }];
await tableA.updateRecordAsync(recordId, { 'attachmentsA': updatedAttachments});
My issue is that sometimes this works and sometimes it doesn't, without any aparent pattern, and I know that the URL from my API call is always correct. When I go to the airtable record and see the activity it shows me that the attachment was uploaded and deleted, but I don't delete it in my code.
Does anyone know how to solve this problem? Thank you!
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
