mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-13 01:28:11 +00:00
fix pdf view
This commit is contained in:
parent
0d74e8f04b
commit
ce162bf414
@ -290,7 +290,9 @@ class IndexController extends InvokeController
|
||||
$userAgent = strtolower(Request::server('HTTP_USER_AGENT'));
|
||||
if ($ext === 'pdf'
|
||||
&& (str_contains($userAgent, 'electron') || str_contains($userAgent, 'chrome'))) {
|
||||
return response()->download($file, $name, [], 'inline');
|
||||
return response()->download($file, $name, [
|
||||
'Content-Type' => 'application/pdf'
|
||||
], 'inline');
|
||||
}
|
||||
//
|
||||
if (in_array($ext, File::localExt)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user