Rescuing a link to a deleted media file

A customer deleted a file on their Kirby-based site and simultaneously sent out a newsletter with a link to that same file. They have now asked me to rescue the link to that file.

The link in question led to a pdf in Kirby’s autogenerated media filestructure. They have reuploaded the file, but of course when Kirby autogenerated the file inside the media folder again, it got a different foldername. So, while the old link was something along the lines of “https://site.com/media/pages/pagename/92ee23903c-1600243108/file.pdf”, the new one is “https://site.com/media/pages/pagename/1639ddba2a-1600344832/file.pdf” - i.e., they differ in the autogenerated alphanumeric folder name.

However, simply making a duplicate of the file and manually creating a “92ee23903c-1600243108” folder to place it in there won’t do the trick - the file is still “not found” when called.

Is there any way to manually change the folder name of a media file created via Kirby so it can still be found in the panel or at least manually through the URL?

Thank you!

The easiest option would probably be to redirect that URL either to the new location in the media folder or in the content folder right from .htaccess or the server configuration, because there is no way that I know to override media folder routes.

The alternative would be to override the file.url component, but that to me seems to be overkill just for one file.

Alright, I’ll just set up a redirect then. Thanks for the reply! : )