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

@@ -1507,7 +1507,7 @@ class ProjectController extends AbstractController
}
//
$filePath = public_path($file->getRawOriginal('path'));
return Response::streamDownload(function() use ($filePath) {
return Base::streamDownload(function() use ($filePath) {
echo file_get_contents($filePath);
}, $file->name);
}