Fix #345: Allow POSTing multidimensional array with file

This commit is contained in:
Zach Borboa
2016-08-07 00:04:36 -07:00
parent 4b1084647b
commit 679ce8e3c4
3 changed files with 157 additions and 84 deletions
+7 -2
View File
@@ -110,8 +110,13 @@ if ($test === 'http_basic_auth') {
} elseif ($test === 'patch') {
echo $http_raw_post_data;
exit;
} elseif ($test === 'post_multidimensional') {
echo $http_raw_post_data;
} elseif ($test === 'post_multidimensional' ||
$test === 'post_multidimensional_with_file') {
header('Content-Type: application/json');
echo json_encode(array(
'post' => $_POST,
'files' => $_FILES,
), JSON_PRETTY_PRINT);
exit;
} elseif ($test === 'post_file_path_upload') {
echo Helper\mime_type($_FILES[$key]['tmp_name']);