fix: 没有后缀名无法下载文件的问题

This commit is contained in:
kuaifan
2023-02-22 12:41:36 +08:00
parent ce7037d317
commit 9f7cdc34b4
4 changed files with 18 additions and 6 deletions

View File

@@ -18,7 +18,6 @@ use Carbon\Carbon;
use DB;
use Redirect;
use Request;
use Response;
/**
* @apiDefine dialog
@@ -1022,7 +1021,7 @@ class DialogController extends AbstractController
}
//
$filePath = public_path($array['path']);
return Response::streamDownload(function() use ($filePath) {
return Base::streamDownload(function() use ($filePath) {
echo file_get_contents($filePath);
}, $array['name']);
}