Help

Re: Is it possible to upload attachments?

Solved
Jump to Solution
5369 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Bryan_McBride
4 - Data Explorer
4 - Data Explorer

Looking over the API documentation, it appears that attachments require a url key, so they must already be available on a web server. Is it possible to upload local files to Airtable via the API? I’d like to build my own form that POSTs to Airtable and uploads an image as an attachment, but it doesn’t look like this is currently possible. Am I missing something?

Thanks!

38 Replies 38
draou_mohssin
4 - Data Explorer
4 - Data Explorer

It’s january 2021, and this feature is not available yet :confused:

Bertha_Kgokong
4 - Data Explorer
4 - Data Explorer

There is an easier solution that does not involve third parties. You can simply save all your documents in a folder - that you then host on a http-server. Use a service like nginx to serve that folder over http, or even https. Then as you save the documents, you also pass the http/s address to the Airtable API - I tested it and it works, will write a code snipet for python in a tutorial soon . . . . . NOTE: I found, you should not immediately delete the files, maybe create a function to delete the files from your server after a couple of seconds, to prevent clutter.

Ah nice! Saas that requires you to also run your own server in parallel, and host all documents in public view :slightly_smiling_face:

Hi! No news for this Upload feature? Thanks

paul_shorey
4 - Data Explorer
4 - Data Explorer

The weird thing about using Cloudinary though, is that Cloudinary is a much better image management solution than Airtable. But, using it as an intermediary, Airtable will copy the file to their own server, and display it as an attachment. So when you go to edit your Airtable, you will be able to delete or re-upload a different image. But unfortunately, this will not sync/update to your Cloudinary. So your Cloudinary will still have the original image. This may become confusing. Alternative is to use Cloudinary, and upload the URL to Airtable as plain text. Then, you will remember that Cloudinary is the source of truth.

Cloudinary has a strict limit of 10mb per file. Or 20mb if you pay for the premium account. So that is something to keep in mind.

I’d like to find some image/file hosting service that is free, disposable, and has no maximum file size, to use as an intermediary. Ideally, it will delete the files I upload to it after some time. Then, I can just use Airtable to manually edit/re-upload the files, after they have been uploaded via the API.

Cloudinary is superior because it lets you resize/optimize/crop images. But, here’s a great trick… CloudFlare also has this, for $20/mo. It lets you pass in any image, from any domain, to their URL, and it will resize/optimize/crop it for you just like Cloudinary does.

Wondering what people think, if this makes sense? I too was hoping to manage all my data, content, and files/images in Airtable.

Partyborn
6 - Interface Innovator
6 - Interface Innovator

Did anyone find a solution in the meantime?

EvgenyL
4 - Data Explorer
4 - Data Explorer

We are really missing this feature. Uploading file using 3d-party service is very inconvenient. Could you please rise the priority of this feature in your backlog? Thank you.

Eugene_Ng
4 - Data Explorer
4 - Data Explorer

Hi, I tried to build an App in Thunkable that can upload pictures into Airtable. I’m thankful I found this post. I’ll be very grateful if this can be done natively. Thank you.

ng010105
6 - Interface Innovator
6 - Interface Innovator

HERE IS The working solution

curl -X PATCH "https://api.airtable.com/v0/{baseId}/{tableId}/{recordId}" \ -H "Authorization: Bearer {YOUR_TOKEN}" \ -H "Content-Type: application/json" \ --data "{\"fields\": {\"attachment1\":[ {\"url\": \"https://www.redcross.org.hk/sites/redcross/files/index_top/Agency%20website%202880x1900%20%20bilingu..."}]}}"

att.PNG

 

https://support.airtable.com/docs/finding-airtable-record-ids