I’ve had a panel hook in place for awhile that renames my uploaded files based on date and page slug. I’ve then manually fed them to a script that uploads them to an object storage service, and then deleted them from the folder.
Now I’m trying to implement the uploading to object storage as part of the hook, and I haven’t figured out how to get my script working in PHP. This isn’t a big deal, as I have it working as a shell script. The problem is, I need to pass the complete unix file path to the shell script, and I can’t figure out how to get that from the
$file object in my Kirby panel hook.
This has to be easier than I’m making it, right? Can anybody point me to how to get that path?