Hi all. I’m looking for any ideas regarding how to setup a means for a client to use Kirby to upload assets (PDFs, maybe video) to a third party services like Amazon S3 or the like - Somewhere not on the host that runs the website. I don’t want to use the hosts expensive disc space or its pricey bandwidth. But I don’t want the process of adding assets to be a disconnect from the Kirby panel. Any ideas or solutions out there? Thanks.
I would probably do something along the lines of…
-
Create a hook for
panel.file.upload
that copies the file to your third-party host (using your API key or whatever) - Save the filename as a read-only text field in the page
- Delete the original file uploaded to Kirby
All these steps can be done within the hook function.
1 Like
Consider creating a Page Method to automate generation of absolute URLs for your remote assets, from the filename!
1 Like
Thanks for the replies.