mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-29 03:10:51 +00:00
Fixed streaming video/mp3 on safari browsers with using local disk
This commit is contained in:
@@ -269,15 +269,15 @@ class FileAccessController extends Controller
|
||||
// Check if file exist
|
||||
if (!Storage::exists($path)) abort(404);
|
||||
|
||||
$header = [
|
||||
"Content-Type" => Storage::mimeType($path),
|
||||
"Content-Length" => Storage::size($path),
|
||||
"Accept-Ranges" => "bytes",
|
||||
"Content-Range" => "bytes 0-600/" . Storage::size($path),
|
||||
$headers = [
|
||||
"Accept-Ranges" => "bytes",
|
||||
"Content-Type" => Storage::mimeType($path),
|
||||
"Content-Length" => Storage::size($path),
|
||||
"Content-Range" => "bytes 0-600/" . Storage::size($path),
|
||||
"Content-Disposition" => "attachment; filename=" . $file_pretty_name,
|
||||
];
|
||||
|
||||
// Get file
|
||||
return Storage::download($path, $file_pretty_name, $header);
|
||||
return response()->download(storage_path('/app/file-manager/') . $file->basename, $file_pretty_name, $headers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
|
||||
'version' => '1.8.1',
|
||||
'version' => '1.8.0.1',
|
||||
|
||||
// Define size of chunk uploaded by MB. E.g. integer 128 means chunk size will be 128MB.
|
||||
'chunk_size' => env('CHUNK_SIZE', '128'),
|
||||
|
||||
Reference in New Issue
Block a user