When uploading a file from base64 using method addMediaFromBase64, the final file extension is .tmp always.
Here is the code i use to upload the file.
$value = "data:text/plain;base64,SGVyZSBpcyBhIHRlc3QgdGV4dC4=";
$user->addMediaFromBase64($value)->toMediaLibrary('licences');
The final file name is: medCAF3.tmp.
Don't must addMediaFromBase64 method add file extension automatically to the file nam?
You can use usingFileName to set the name of file.