Правим контроллер

This commit is contained in:
p.belezov 2024-06-18 14:45:09 +08:00
parent 04dbef81f6
commit 7bc0336b7a

View File

@ -8,6 +8,9 @@ class DownloadController extends Controller
{
public function download($file_name) {
$file_path = public_path('/'.'downloads/'.$file_name);
return response()->download($file_path);
$headers = [
'Content-Type' => 'video/mp4',
];
return response()->download($file_path, $file_name, $headers);
}
}