Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

how to get the field name of an uploaded file in Controller::request?

Controller::request->getUloadedFiles() does not contain the name of the input field.



8.7k
Accepted
answer

Yes, it contains it:

```php $file->getName(); ```

http://docs.phalconphp.com/en/latest/api/Phalcon%5Http%5Request%5File.html

I find the getKey method to get the name value of the input.