mirror of
https://github.com/friendica/friendica
synced 2025-04-27 05:10:10 +00:00
Test file uploads
This commit is contained in:
parent
ca5fd01f75
commit
3e303fb366
3 changed files with 15 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue