fix: 下载文件出现文件损坏的情况
This commit is contained in:
@@ -970,7 +970,10 @@ class DialogController extends AbstractController
|
||||
return Redirect::to(FileContent::toPreviewUrl($array));
|
||||
}
|
||||
//
|
||||
return Response::download(public_path($array['path']), $array['name']);
|
||||
$filePath = public_path($array['path']);
|
||||
return Response::streamDownload(function() use ($filePath) {
|
||||
echo file_get_contents($filePath);
|
||||
}, $array['name']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user