Cakephp 4.x Rest API Image upload

I am currently working with image uploading .
Is it possible to add POST Method for my update ? the purpose of this post method is to upload image via my REST API

Are you able to add POST to that route in ./config/routes.php?

Something like:

$routes->connect('/api/users/:id', [
    'controller' => 'Users',
    'action' => 'edit',
], [
    'pass' => ['id'],
->setMethods(['PUT', 'PATCH', 'POST'])

Such relief, It worked . :slight_smile: thank you . keep in touch

1 Like