Jul 25, 2018 06:47 AM
I have an attachment field containing images. I see that the stored attachment object has a url property. In another formula field I would like to show just the attachement url. Any ideas?
Thanks.
Solved! Go to Solution.
Jun 30, 2020 09:26 AM
For more than three attachments, keep expanding the second formula. Notice the pattern in the MID()
functions:
It starts by grabbing characters beginning at position 100…
…then position 400, then position 700. In short, we’re adding 300 each time to grab the next URL. Just keep that pattern going. The next one would start at position 1000, then 1300, then 1600, etc.
Also notice the pattern in the comparisons made before grabbing each subsequent piece. Each line increases the number we’re comparing against from the start of {Expanded}
. The first one is just grabbed outright because we know we have at least one URL. If we have more than one—IF(LEFT(Expanded, 1) > 1
—we grab the next piece. If more than 2, grab the next one. Keep that pattern going as well.
Also, for more than 9 attachments, you would need to change all instances LEFT(Expanded, 1)
to LEFT(Expanded, 2)
.
A lot of programming is about finding patterns. Learn to see the patterns in the data you’re playing with, and you can write code to find things based on those patterns.
Jul 01, 2020 01:00 AM
Thank you so much. You save my day ! Good Work and clear explanations.
Jul 02, 2020 01:49 AM
Thanks so much, you have saved me hours of work!
May 02, 2023 11:57 PM
Suddenly, today, all those formulas above have stopped working. By some reason Í do not understand. Maybe Airtable did un update to block this way of getting a permanent URL from attachments. Anyone knows why this is happening? Thank's in advance. 🙂
May 04, 2023 09:44 AM
Same issue as @Alvaro_Hernande here!! 😓
@Justin_Barrett @ScottWorld any idea on what might be happening?
May 04, 2023 11:28 AM - edited Jun 09, 2024 06:06 AM
Formulas can no longer be used to get URLs of attachments, because they will result in non-working URLs.
To get a temporary working URL for an attachment that will expire after 2 hours, you can temporarily access the URL for 2 hours via Airtable's automations or any other app that accesses Airtable's API, such as Make's advanced automations for Airtable.
To get a permanent working URL for an attachment that won't expire, you would need to move your attachments to a cloud drive (such as Google Drive), and you can use a tool like Make's advanced automations & integrations to manage those files and access the URLs of those files. You could even use Airtable's Google Drive sync to keep a list of all the permanent URLs within Airtable.
If you’ve never used Make before, I’ve assembled a bunch of Make training resources in this thread. For example, here is how you would instantly trigger a Make automation from Airtable.
I also give live demonstrations of how to use Make in many of my Airtable podcast appearances here. For example, in this video, I show how to work with Airtable attachments in Make .
Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld
May 09, 2023 02:54 AM
This has broken for me as well which is very frustrating.
Apr 30, 2024 01:29 AM