I try this:
$typefile =$request->file('filename')->getMimeType(); $fileName = $uid.'|'.$variant.'|'.$subject.'.'.$typefile; $request->file('filename')->move('upload/', $fileName) A file is loaded into the folder, the name of which is the type of this file. And when downloading, it turns out that, for example, the picture became an executable file with the exe extension.
For example:
I send a picture with the extension png.
I do:
echo $fileName; I receive:
228869386|3|inf.image/png And in the folder:
Name: png, type: exe.