Step 3 is the kicker. The way I’d approach it (just from thinking about it briefly) is either:
-
Carry out steps 1 & 2. ensuring that the image name is the same and unique across all records, use the API to lookup based on the image name, and replace with new image
-
Depending on what you need to do with Image Magick you could maybe do the same thing with an image automation platform (e.g Transloadit)
Thanks for your reply @andywingrave. Do you happen to have a code snippet showing how to upload an image file to a specific record field replacing the previous one?
Thanks, Stefan
Thanks for your reply @andywingrave. Do you happen to have a code snippet showing how to upload an image file to a specific record field replacing the previous one?
Thanks, Stefan
I don’t at the moment, sadly :pensive:
Perhaps ask in the Work Offered category for now?
I don’t at the moment, sadly :pensive:
Perhaps ask in the Work Offered category for now?
Thanks @andywingrave. I think I have found a way to solve that. Using Airtable Scripts Block, the following code snippet can update a record with an image, provided the image can be read from a remote server:
let newAttachmentUrl = 'https://www.domain.com/mynewimage.jpg';
await table.updateRecordAsync(record, {
"ImageField": [
{ url: newAttachmentUrl,
filename: 'mynewimage.jpg' }
],
})
Regards, Stefan
Thanks @andywingrave. I think I have found a way to solve that. Using Airtable Scripts Block, the following code snippet can update a record with an image, provided the image can be read from a remote server:
let newAttachmentUrl = 'https://www.domain.com/mynewimage.jpg';
await table.updateRecordAsync(record, {
"ImageField": [
{ url: newAttachmentUrl,
filename: 'mynewimage.jpg' }
],
})
Regards, Stefan
Awesome! Nice one! Thank you for posting the solution!