Hi, I’m having a problem getting the last version of my assets.
1- I have a shema with a Rich Text. Here I inserted an Asset (using the Insert Asset button).
2- Next, I changed the asset
3- In the editor, I see the first version, not the last. Also when accessing as a client.
4- I tried deleting the asset from the content, and insert it again. And I still get the first version.
Is there a way to automatically update the reference in the field to the last version? (add the proper “?version=X” to the URL of the asset).
Or is there a way to add a parameter to the URL that means, give me the last version? (like ?version=last)
Or is there a way to stop the versioning, so that the first version is always the last updated? (we don’t use versioning of assets anyway)
Thanks a lot!
“No” to all your questions, sorry. You have to update the link manually. But I think I have to change the behavior and do not add the version when adding the version.
“do not add the version when adding the version.” what do you mean?
Sebastian, I think the “expected” behaviour would be that the URL without “?version=X” points to the last (current) version. That way the inserted assets would always reference the last version.
I thought that I add the assets URL with the version query string to the rich text, but I don’t do that. The problem you experience is the CDN and caching in general. I need to find a solution for that, but unfortunately I cannot just turn it off, because otherwise the costs would explode.
Hi Sebastian, would it be possible that when an asset is updated, the system purges that asset in the CDN? In CloudFlare it could be done based on the URL of the assets. I guess Fastly should be similar.
(we actually use CloudFlare and purge the assets with every update)
Yes, I have implemented that yesterday and uploaded it but I haven’t had the time to fully test it.
Great! But … it’s not working yet. I changed an asset yesterday and only after some hours the change was visible. I tried again an hour ago with same results.
Which URL do you use to retrieve an asset?