Nov 29, 2023 02:36 PM
Hey All,
I'm looking for a way to add files that are not hosted on a public site. The server hosting the files allows for basic auth so I should be able to pass credentials. I'm wondering if it's possible to use `fetch` in an extension to get the file and then add the file to an attachment field.
Definitely open to better ideas.
Cheers,
Collin
Solved! Go to Solution.
Dec 01, 2023 06:10 AM
Hey Colin - good idea, but I don't think this will work for you. Attachments, whether uploaded via Web API, custom extension (Blocks SDK), Scripting Extension, or Automation Run Script Action must all come from endpoints without basic or header-based authentication. Authentication that happens via URL only (such as an AWS S3 presigned URL) will work though.
Dec 01, 2023 06:10 AM
Hey Colin - good idea, but I don't think this will work for you. Attachments, whether uploaded via Web API, custom extension (Blocks SDK), Scripting Extension, or Automation Run Script Action must all come from endpoints without basic or header-based authentication. Authentication that happens via URL only (such as an AWS S3 presigned URL) will work though.
Dec 01, 2023 07:01 AM
Thank you! I will try this out and let you know how it goes.
Dec 05, 2023 04:14 PM - edited Dec 05, 2023 04:14 PM
For those people reading this thread who do not know how to write Javascript code, I add attachments to Airtable in a no-code/low-code way using Make's Airtable automations & integrations.
I simply upload the attachment files to Google Drive and then get a share link to pass onto Airtable from there. (But you can do this with any cloud storage service — it doesn't need to be Google Drive.)
Also, I discuss how to send multiple attachments to Airtable on this episode of the BuiltOnAir podcast.