Aug 30, 2020 04:18 AM
I have created a PHP website driven by AirTable.
I have a test subdomain which is password protected with a .htpasswd file and so this connects directly to AirTable API so users can see the changes they are making.
To make the changes go live I created a compile script available on the test subdomain, which queries the API for everything we want, and turns them into json files which I put in the appropriate place so that the live website can just read these files with PHP and create the website.
This works well but the website does use the attachment URLs for things like website images and attachments. I am aware of the fact these URLs are not reliable and may be subject to change but for the moment a simple recompile would update and make everything well again.
Now though, I have a more high traffic website and I cannot take the risk of attachment URLs changing so I need some sort of solution which lets me download the images and put them somewhere else and then update the URLs in the JSON fields.
This is probably something I can code but having had a google it appears stuff like Gatsby or Netlify could do a lot of the heavy lifting here.
I am looking for anyone who has gone down this path already?
Worst case scenario is that I have to move to a normal CMS.
All ideas super welcome
Kind Regards
Simon
Aug 30, 2020 07:51 AM
I have not heard of the URLs ever changing. In actuality, the REVERSE problem exists: even after you delete your attachments from Airtable, they continue to live on at their URL for at least a year, and possibly permanently.
Aug 30, 2020 12:54 PM
Thanks Scott
AirTable have said the URLs may change occasionally depending on what part of the code they are working on.
I think the solution I’ve decided on is just copying the files over with a PHP script
Aug 30, 2020 01:01 PM
That’s good to know, thanks!