From 7bc0336b7a31067c8322bc3683de7f24adb720c1 Mon Sep 17 00:00:00 2001
From: "p.belezov"
Date: Tue, 18 Jun 2024 14:45:09 +0800
Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=B8=D0=BC=20=D0=BA?=
=?UTF-8?q?=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Http/Controllers/DownloadController.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/Http/Controllers/DownloadController.php b/app/Http/Controllers/DownloadController.php
index 345f8f1..db64272 100644
--- a/app/Http/Controllers/DownloadController.php
+++ b/app/Http/Controllers/DownloadController.php
@@ -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);
}
}