We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Can not get "name" form attribute of uploaded file

I have a simple HTML form like this:

<input type="file" name="hand">
<input type="file" name="foot">
<input type="file" name="head">

By using doc example:

        if ($this->request->hasFiles() == true) {
            // Print the real file names and sizes
            foreach ($this->request->getUploadedFiles() as $file) {
                    echo $file->getName();
                    echo $file->getSize();
            }
        }

How can I tell which image is hand, foot, head ?



5.3k
Accepted
answer