Have you done the symlink. Also search some articles like (stackoverflow) and make sure you have iis config correct for laravel.
Nov 14, 2021
3
Level 1
jpg File downloaded from server do not open
I have this code to download files from the server
$tt=\File::mimeType($file_path);
//also test this but do not work
//$headers = array('Content-Type' => 'image/jpeg');
$headers = array('Content-Type' => $tt);
return response()->download($file_path, $FileName ,$headers);
in the development server (XAMPP), It is OK jpg file download and opened. but when deploy in production server (IIS) file download but I can not open it. I check the downloaded file header, laravel change file header when downloaded from the server, for .pdf file it is OK and work but .jpg file have this problem
Please or to participate in this conversation.