Date within Media Link

Good Day All,
Still somewhat new to Sharptools, apologize if this has been answered before. I have a link to a media file (image) which I would like updated with the current date, for example:

http://address.com/20201217-12.jpg where 20201217-12 is YYYYMMDD-HH

Does anyone know if there is a way to do this? Thanks in advance!

Hi @Bryan_Dearlove, welcome to the community. What is the media source? Perhaps there might be some other options that I can help take a look. Dynamic media source link is not currently supported, but I’d encourage you to post a Feature Request with detailed use cases so others who are interested can vote as well.

You could host a script somewhere to perform the redirect for you. For example, I put together a quick Glitch app that does this for you:

Glitch :・゚✧

The project above is just configured with “demo.com” as the base URL to redirect to, so it’s not particularly helpful, but you can remix the project and adjust the settings as you see fit.

So in the project above, if I set my Media Tile URL to https://date-based-image-redirect.glitch.me or attempt to visit the URL directly in my browser, I’m redirected to http://demo.com/20201218-05.jpg where it follows the YYYYMMDD-HH.jpg format. :slight_smile:

So if my Media resource was set to refresh every hour, then every hour it would hit the base redirect script and automatically get redirected to the newest image based on the timestamp.

1 Like

Thanks both. I’ll put in a feature request and look at a script alternative, thanks.