Hi,
I try to write a custom component for file upload in the panel.
I took the example from:
The upload button appears and works.
Uploading the file an error message is shown and claiming ‘No route found for path: “media/freePicturesPost” and request method: “POST”’.
Here is where the trouble starts.
I registered a routing:
Kirby::plugin('test/media', [
'routes' => [
'pattern' => '/api/media/freePicturesPost',
'method' => 'POST',
'action' => function () {
// do something
}
]
]);
But it seems so be ignored.
What could be wrong?