Oct 20, 2022 07:29 AM
Per the attachment changes after Nov 8 -
Any attachment URLs obtained via the public API and the CSV export functionality will expire after a few hours.
If I am using Airtable as a CMS for my own site where the data (and attachment column) is being fetched via API, what url will the API return 2 hours after the attachment as been uploaded? For example let’s say the original url of the attachment is airtable.com/image-first-location.jpg, I understand after 2 hours it will return 404 not found. However if I make a second API call after 2 hours, would the url returned for the attachment field be a new “working” url such as airtable.com/image-second-location.jpg or would it still return airtable.com/image-first-location.jpg (404 not found)?
In other words, if the user visiting my site refreshes the page (thereby making a new API request), would it get an updated (working) attachment url?
Oct 20, 2022 07:42 AM
It will return a brand new URL after 2 hours: image-second-location.jpg
Oct 20, 2022 07:49 AM
Thank you Scott! I was following the other thread closely. Where can I confirm this in their support? I only have @ Al_Biedrzycki’s reply but wanted to confirm as I don’t want to get caught flat footed on Nov 8th in case it’s not true.
There will be several public URLs alive at the same time. We will guarantee that a URL will not expire within 2 hours of receiving it, so if a user wants to refresh their URLs every hour, they will always have a working URL.
In regards to your last point about the timing of the rollout, we plan to offer a temporary opt-out period so that you or your organization has additional time to plan for the change. Details on this opt-out process will be shared closer to the November rollout.
Oct 20, 2022 07:51 AM
The support article on this topic is here:
Oct 20, 2022 07:57 AM
Thank you Scott, I had read through that link multiple times but I didn’t see anywhere on the page if it confirms that making a second API call will get a new working attachment url. It just stresses that -
Any attachment URLs obtained via the public API and the CSV export functionality will expire after a few hours.
API - Similar to CSV downloads, attachment links obtained via Airtable’s API will expire after a given amount of time.
Oct 20, 2022 08:43 AM
Any time you make a new API call, you will be getting a valid & working URL.
It’s only if you try to go back later and use a URL that you received earlier is where the problems will arise. In other words: Let’s say you make an API call on Monday at 9am and you receive a URL, and then you copy & paste that URL into your Notes program on your Mac. And then, a few hours later or a few days later, you go into your Notes program to grab the URL that you received on Monday at 9am. That URL won’t work anymore, because it is an expired URL.
But as long as you’re continually making new API calls, you will always receive a valid URL at the time of your API call.
Oct 20, 2022 08:47 AM
I am not sharing static urls nor pasting them anywhere, rather I’m just rendering a page with an API request each time and I just need the images to show up during that render. That being said it seems the changes won’t break my workflow then.
Thanks for all the help Scott!