Dec 22, 2021 07:09 AM
I’m currently using the Airtable script ‘Convert URL’s To Attachments’ to populate a column w/in my table with images coming from a URL.
My table’s data is refreshed once per hour - so currently my images need to be downloaded after each refresh (manual at the moment)
I’m trying to automate this process by using this script w/in the Automations settings for my base but do not see a way to select an existing script when setting up the automation.
Dec 22, 2021 02:14 PM
After a quick test, the file still exists. I’ll check again in 24 hours and see if anything changes.
Dec 22, 2021 07:20 PM
Bill you can’t just use this forum to swindle us into giving you sandwiches all the time
Dec 22, 2021 07:29 PM
I’m hungry. And it repeats every day.
Dec 23, 2021 10:20 AM
Just a few comments to the topic
(tl;dr: “it’s still unpredictale and unclear for me”)
Few mothns ago i did automation script to merge attachments from branch to main and hit ‘duplicates issue’(when you merge main’1,2’ with branch’3,4’, you receive ‘1,2,3,4’, but after branch update record(4=>5) it will merge 3,5 to 1-4, and 3 became duplicate. Then I changed it to ‘merge removing duplicates’ and discovered another problem because similar file in two different fields has different links, and defininition “same name=duplicate” is of course wrong. At least, should be name&size
Now i did some utility to backup/restore attachments including small script to display size of all attachments in all tables, and discovered that their actual downloaded number and size less than expected by script (link to attachment contain 8-digit code, which i append to filename for restore purposes, so i supposed 10 similar files must have 10 downloaded “versions”). And it’s not true, Airtable can detect such case and store only one file, with 10 links to it.
But when i tried to test it and uploaded to small table, 3 files repeatedly to 10 records in random order and number per 1 record (by usual upload through user GUI), i found that all of them has different link, none repeated. The method of storing attachments in Airtable is a mystery for me again.
Now i doubt that “Airtable can detect such case”. maybe we just cloned some records with sync or automation ot “horizontal to vertical” table transfer.
Dec 23, 2021 12:53 PM
Airtable has an internal attachment ID for every attachment that you can see through scripting. Airtable is probably using this internal attachment ID for determining duplicates. Different records could point to the same attachment ID, but you probably cannot use the same attachment ID multiple times in the same record.
Dec 23, 2021 05:40 PM
The image remains despite being deleted and record history cleared. :frowning:
Dec 23, 2021 07:44 PM
Thanks for letting us know. Sounds like Bill was right again. But we’re so used to him being right that no-one was willing risk a sandwich.