1 # array http\Env\Request::getFiles()
3 Retrieve the uploaded files list ($_FILES).
11 * array, the consolidated upload files array.
15 Here's an example how the original $_FILES array and the http\Env\Request's files array compare:
17 $r = new http\Env\Request;
20 foreach ($_FILES as $name => $data) {
21 foreach ((array) $data["tmp_name"] as $i => $file) {
22 $f[$name][$i] = array(
24 "name" => $data["name"][$i],
25 "size" => $data["size"][$i],
26 "type" => $data["type"][$i],
27 "error"=> $data["error"][$i]
31 assert($f == $r->getFiles());
33 You can see that the second and third dimensions are swapped and ```tmp_name``` became ```file```, e.g:
38 "file" => "/tmp/phpXXXXXX",
39 "name" => "picture.jpeg",
41 "type" => "image/jpeg",