Hi Kirby community,
I need some help with a situation I’ve encountered after updating from Kirby 3.6 to Kirby 4. Here’s a brief summary of the issue and my goals:
We’ve been using a “Downloads” page to offer direct downloads for our users, and up until now, we’ve been using direct links to files from the media
folder. After updating to Kirby 4, I’d like to move to using the newly introduced UUIDs for the download links to make them more reliable in the long run. To ensure the old links continue to work, I’m planning to use redirects to the new permalinks for the files.
After updating and deleting the media
folder, I regenerated the UUIDs and tried accessing the download files via their permalinks. At first, this didn’t work at all. I noticed that the media/pages/downloads
folder was almost empty. However, as soon as I opened a file from the Panel, a folder was generated in the media
folder, and after that, the permalink worked.
My question is:
Is there a way to generate all the necessary files for the Downloads page in the media
folder without manually accessing each one via the Panel? Or is there a better approach to reliably serve static downloads in Kirby? Would it be a better way to link to /downloads/filename.pdf?
Thanks in advance for your help!