src/Http/ServerRequest.php
public function getUploadedFiles()
    {
        if (is_array($this->uploaded_files) && count($this->uploaded_files)) {
            return $this->uploaded_files;
        }

        foreach ($_FILES as $key => $file) {
            $this->uploaded_files[$key] = static::getUploadedFileLeaves($file);
        }

        return $this->uploaded_files;
    }
public function getUploadedFiles()
    {
        if (is_array($this->uploaded_files) && count($this->uploaded_files)) {
            return $this->uploaded_files;
        }

        foreach ($_FILES as $key => $file) {
            $this->uploaded_files[$key] = static::getUploadedFileLeaves($file);
        }

        return $this->uploaded_files;
    }
Retrieve normalized file upload data.
This method returns upload metadata in a normalized tree, with each leaf
an instance of Psr\Http\Message\UploadedFileInterface.
These values MAY be prepared from $_FILES or the message body during
instantiation, or MAY be injected via withUploadedFiles().

@return array An array tree of UploadedFileInterface instances; an empty
array MUST be returned if no data is present.