fix: 下载文件出现文件损坏的情况

This commit is contained in:
kuaifan
2022-12-18 16:02:57 +08:00
parent e18fcd5c43
commit f0d0ee69c8
5 changed files with 24 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ use Guanguans\Notify\Factory;
use Guanguans\Notify\Messages\EmailMessage;
use Madzipper;
use Request;
use Response;
use Session;
/**
@@ -990,7 +991,7 @@ class SystemController extends AbstractController
if (empty($file) || !file_exists(storage_path($file))) {
return Base::ajaxError("文件不存在!", [], 0, 502);
}
return response()->download(storage_path($file));
return Response::download(storage_path($file));
}
/**