Image Uploads in Custom Route

Hey all,

I was wondering what the most effective way of uploading images in kirby? I have a custom route which allows selecting a file but I’m not sure the most effective way to upload to the content folder of the page.

I noticed there’s an upload class available in the toolkit but I’m not quite sure how to use it.

Cheers

Since this thread is marked as solved, did you figure out how to use the class? Would you mind sharing? I’m also trying to use that class but haven’t been able to figure it out yet.

You may want to checkout file uploading in the panel for example code: /panel/app/controllers/api/files.php

Thanks for the suggestion. I’ll take a look at that file.