neat-php / http-server

Neat HTTP Server components
MIT License
0 stars 0 forks source link

Files array doesn't maintain structure #12

Closed baukevdw closed 3 years ago

baukevdw commented 3 years ago

\Neat\Http\Server\Server::receiveUploadedFiles

Given the following $_FILES array ```php $_FILES = [ 'item' => [ 'name' => [ 1 => [ 'img' => 'abc.png', ], ], 'type' => [ 1 => [ 'img' => 'image/png', ], ], 'tmp_name' => [ 1 => [ 'img' => '/tmp/abcdef', ], ], 'error' => [ 1 => [ 'img' => 0, ], ], 'size' => [ 1 => [ 'img' => 100, ], ], ], ]; ```
Will result in the following files ```php [ "item" => [ 0 => [ 0 => Neat\Http\Server\Upload { #file: GuzzleHttp\Psr7\UploadedFile { -clientFilename: "abc.png" -clientMediaType: "image/png" -error: 0 -file: null -moved: false -size: 100 -stream: GuzzleHttp\Psr7\Stream {} } } ] ] ```
Expected output ```php [ "item" => [ 1 => [ "img" => [ Neat\Http\Server\Upload {...} ], ], ], ] ```
HTML ```html ```