<?
header('Content-Type:application/json; charset=utf-8');


$req = json_decode(@$_REQUEST['body'], true);

$res = Array('files' => Array(), 'FILES' => $_FILES);

foreach($req['files'] as $file) {
    $file['resourceid'] = $file['uid'] + '_TYPO3';
    $file['status'] = 'done';
    array_push($res['files'], $file);
}

echo json_encode($res);
?>
