Thanks… this did it, but its a bit of a dance… im sure theres a better way. I did try dirname but it was giving me the wrong answers (theres a chance i was doing it wrong!).
Woop! thanks @texnixe that did it. Just one tiny problem now. Ive got it to rip the album cover form the MP3 and save it to the file system, but it’s not showing up in the files panel, I’m guessing because it was done directly on the filesystem rather then through the panel.
How do i “touch” the image so that the panel is aware of it?
But going back to the original problem: does the newly created page not even show up after refreshing the Panel? I mean, if you upload files to the filesystem, they do get recognized by the Panel without having to publish them?
And remove the $page parameter…
When i upload MP3 files to page, the file gets created, the cover image file gets created from the mp3 file, the meta file gets created and stamped with all the stuff in the hook, including the name of the coverfile…
…the cover image is just not showing up in the panel.
Direct to the file system doesn’t seem to work either. It seems you must upload them through the panel for them to show up in the panel, which i can see upsetting some devs who like to work without panel that have clients that do use the panel… sooner or later the dev is going to do something the client cannot see.
The odd thing is that i just deleted the media folder for this page and even that didnt force them to show up.
I had to delete my last post, I uploaded to the wrong folder.
No, it doesn’t need a meta data file, but you have to reload the page to make the file show up. Unless you have limited the section to files with a given template, of course. Then the file wouldn’t show up without a meta data file.