$fileData) { if ($fileData['error'] !== 0) { _error(sprintf("Upload error '%d'", $fileData['error'])); } $fileName = htmlspecialchars($fileData['name']); $mimeType = $fileData['type']; $fileSize = $fileData['size']; $targetFile = $config['upload_dir'] . '/' . $fileName; if (! $config['fake']) { if (! move_uploaded_file($fileData['tmp_name'], $targetFile)) { _error('Error saving uploaded file'); } } } _log(sprintf("[multipart] Uploaded %s, %s, %d byte(s)", $fileName, $mimeType, $fileSize)); _response();