[UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation

This commit is contained in:
2021-05-02 15:02:26 +00:00
parent 3b39046a38
commit 2b83a4b627
5 changed files with 34 additions and 38 deletions

View File

@@ -92,7 +92,7 @@ class Avatar extends Controller
list(, $mimetype_user, , $encoding_user, $data_user) = $matches;
if ($encoding_user == 'base64') {
$data_user = base64_decode($data_user);
$tempfile = new TemporaryFile('avatar');
$tempfile = new TemporaryFile(['prefix' => 'avatar']);
$path = $tempfile->getRealPath();
file_put_contents($path, $data_user);
$sfile = new SymfonyFile($path);