basename"; // Check if file exist if (! Storage::exists($path)) { abort(404); } // Get pretty name $pretty_name = get_pretty_name($file->basename, $file->name, $file->mimetype); return response() ->download(Storage::path($path), $pretty_name, [ '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=$pretty_name", ]); } }