Upload exception : " is not a valid uploaded file"

Hello,

I intend to upload files using Slim 4.5. It works with image files, but not with PDF files.

The UploadedFile throws the following exception : " is not a valid uploaded file"

Client side

input type=“file” multiple=“multiple” name=“foo”

Server side

$files = $this->request->getUploadedFiles();

foreach ($files as $file) {

$file->moveTo($destfile);

}

What did I do wrong ? Missing configuration ?

PDF uploads work now, using getStream() :

file_put_contents($destfile, $file->getStream()->getContents());