Upload file CakePHP 4 did not work

Hay guys, I have a code from my controller to upload a file
this code is working fine in cakephp 3

$myname = $this->request->getData()['file']['name'];
$mytmp = $this->request->getData()['file']['tmp_name'];
$mysize = $this->request->getData()['file']['size'];

But when I use CakePHP 4, this code doesn’t work
please help me, any reference to solve this problem
thankyou

It’s work when I use

$myname = $this->request->getData()['image']->getClientFileName();
$mytmp = $this->request->getData()['image']->getStream();
$mysize = $this->request->getData()['image']->getSize();

but now, the move_upload_file did not work
this is my code
move_uploaded_file($mytmp, WWW_ROOT.$mypath)
what’s wrong
help please

Does this help?

thank you bro, it works