Create page via the frontend with file upload

I am currently building a page with a form for users to create pages and upload files to their account. I successfully built a form to create pages on the frontend with pages->create(), but I am unable to figure out how to upload a file to these pages.

The way I have it built is by creating a page for each client when they register and for each year a sub page is created. Each subpage should have a list of all of the clients file. I don’t want any of the clients to have access to the panel - I have basically everything built but can’t figure out how to upload a file to these pages.

Any suggestions how to do this?

You can simply get the path to the page’s content directory ($page->root()) and move the uploaded file to this directory using the standard PHP file uploading function (move_uploaded_file()). There’s nothing special Kirby-ish you have to worry about. :smile:


Thanks lukasbestle! Ill try it out

Have you figured it out? If yes, could you post the code? Thank you in advance.