Test file uploads

This commit is contained in:
Michael 2021-05-24 07:43:42 +00:00
parent ca5fd01f75
commit 3e303fb366
3 changed files with 15 additions and 5 deletions

View file

@ -83,4 +83,16 @@ class HTTPInputDataDouble extends HTTPInputData
{
return static::$injectedContentType;
}
protected static function fetchFileData($stream, string $boundary, array $headers, string $filename)
{
$data = parent::fetchFileData($stream, $boundary, $headers, $filename);
if (!empty($data['tmp_name'])) {
unlink($data['tmp_name']);
$data['tmp_name'] = $data['name'];
}
return $data;
}
}