Mar 18, 2023 03:43 AM
Hi, I have many rows with multiple attachments. Some attachment urls are having https://v5.airtableusercontent.com/v1/ format. Some of them have https://dl.airtable format.
How do i tweak the script if possible to get https://dl.airtable format? I need the direct url link with .png in the link for another purpose
Mar 18, 2023 06:48 AM
You cannot control the type of link you get, and you can eventually expect to always get the new style expiring links without the filename.
See this support article for more info.
Mar 18, 2023 07:30 AM
Thank you for the clarification. I want to update woocommerce product images where I need to have the ".png" at the end of the url.
Do you have suggestions on how to achieve this workflow?
Mar 18, 2023 02:27 PM
I am not familiar with woocommerce, so I cannot advise you on that side.
If this is a temporary one-time upload, you could try creating a formula field that reveals the dl.airtable.com url, then extract the url from the formula field. Currenly those urls still work for me, although documentation states that those urls will become invalid.
Mar 20, 2023 04:01 AM
Another possiblity: upload all your airtable images to a cdn such as cloudinary.com, and then put links to the cdn images in woocommerce. Add the cdn image links to airtable so you can keep track of the images.
Apr 29, 2023 01:07 PM
Can someone please tell me the formula to get the attachment URL in the new https://v5.airtableusercontent.com/... format?
The one I am aware of only returns the format https://dl.airtable...
IF(
AND(
{Attachment},
FIND(
",",
{Attachment}
) = 0
),
RIGHT(
LEFT(
{Attachment},
LEN(
{Attachment}
) - 1
),
LEN(
LEFT(
{Attachment},
LEN(
{Attachment}
) - 1
)
)
- SEARCH(
"https://",
{Attachment}
) + 1
),
IF(
{Attachment},
RIGHT(
LEFT(
RIGHT(
{Attachment},
FIND(
",",
{Attachment}
) - 1
),
LEN(
RIGHT(
{Attachment},
FIND(
",",
{Attachment}
) - 1
)
) - 1
),
LEN(
LEFT(
RIGHT(
{Attachment},
FIND(
",",
{Attachment}
) - 1
),
LEN(
RIGHT(
{Attachment},
FIND(
",",
{Attachment}
) - 1
)
) - 1
)
)
- SEARCH(
"https://",
RIGHT(
{Attachment},
FIND(
",",
{Attachment}
) - 1
)
) + 1
)
)
)
Thank you!