Help

Fetching image URL from table in Airtable with curl

Topic Labels: API Scripting
219 1
cancel
Showing results for 
Search instead for 
Did you mean: 
fvgm-spec
4 - Data Explorer
4 - Data Explorer

I am trying to create a script using curl which basically would download the image from the url embedded within the field of the JSON I downloaded with the API. curl is supposed to use the whole value of the key `url`(

https://v5.airtableusercontent.com/v3/u/29/29/1716998400000/APymLz9oGAW4AZ1vM_9z3w/53CMUJ...) + the value of the `filename` (SKM_36722071214070ff.pdf) and then the desired output name of the file.
 
It would be the same that browsing the url + filename, but when passing just the url to the browser it displays the attachments as the are in the Airtable field, but if I add url + filename in the form url/filename it doesn't displays the file.
 
Is there any other approach that I can download all images attached to my airtable fields programatically, including pdf files, png images, and so on?
1 Reply 1

The URLs for files in attachment fields no longer have any meaningful information in them, such as the filename. This was part of the change to expiring urls for attachments. If you add a filename to the url, you are changing the url, so you will not be able to access the file.

Try downloading the file with whatever name you get and then rename the file if you must.