I have a Kirby 3 installation running on Apache server and can successfully upload an .mp3 file via the panel.
My issue is that once I have uploaded my .mp3 file via the panel and I go to my frontend I get an error that the .mp3 file can not be found in the media folder.
After I refresh the page the file is there though. I have looked in the media folder and can confirm upon saving my post in the panel for all other media files (images) one is generated in the media folder but not for the .mp3 file until after visiting the page, and therefor only shows after reloading page once more.
Any ideas how to make Kirby generate also the .mp3 file to the media folder?
I see, for the images though as soon as I save the post in the panel I can see a .jobs folder in the media folder being created for that specific post. Not the case for the mp3 file.
The problem is that when I want to get some metadata info on the mp3 file via getId3 as that can’t find the file in the /media folder. As I’m fetching the mediaUrl() and passing that to getId3.
The easiest solution would be to point it to the content folder right?
The jobs folder for images is created because the Panel itself creates thumbs for the images for use in lists etc., while that doesn’t happen for other types of files.
Urls to the content folder won’t work out of the box, because direct access to the content folder is blocked by .htaccess (at least on Apache). You can either work with the path to the file in the content folder or force creating of the copy in the media folder via a hook, or open up the URL to the content folder (and then prevent the copy).