Help

Re: Create Attachment from within script no URL

2082 0
cancel
Showing results for 
Search instead for 
Did you mean: 
david_stephenso
4 - Data Explorer
4 - Data Explorer

I have a script that is creating (by sourcing data from airtable tabs) a large text result that I would like to store as a file attachment column in airtable.

I cannot see how to take a text variable (e.g. 1000 lines of text) and turn it into an attachment in an airtable attachment column, all within a script.

I would much prefer to be able to do this all from within the script, rather than POSTing the content to some file store site on the internet and then adding that URL to the attachment.

thanks

David

4 Replies 4

Welcome to the Airtable community!

You are not the only one. However, for now, this is what we must do.

Thanks very much for the prompt reply.

it it possible to pretend to be the browser and post (from the script) the content of the file to the Airtable API? and create the attachment via that route?

cheers
David

The Airtable REST api has the same limitation. The file must be at a publicly accessible url.

Nora_Brown
6 - Interface Innovator
6 - Interface Innovator

I would love to do this as well. You can create a file, or a data url, in JS, but there is no way to add it as an attachment currently. Could you share how you send your file to a publicly-accessible host as a stopgap?