我将文件保存在以下路径的存储文件夹中 . 文件存在自过去6个月以来 . 它运行良好,显示文件非常好 . 突然开始显示一个白色的盒子而不是图像 .

storage/app/public/modules/applications/1/borrower_picture

图片路径:

http://project.seedout/application_images/1/borrower_picture/picture_8.png

显示路线代码的图像:

Route::get('application_images/{borrower_id}/{foldername}/{filename}', function ($borrower_id, $foldername, $filename) {
     $path = storage_path('app/public/') . 'modules/applications/' . $borrower_id . '/' . $foldername . "/" . $filename;
     if (!File::exists($path)) {
         $path = config("seedout.admin.default_gravatar");
     }
     $file = File::get($path);
     $type = File::mimeType($path);
     $response = Response::make($file, 200);
     $response->header("Content-Type", $type);
     return $response;
})->name('application_images');

$path 变量显示在路径下方 .

F:\xampp\htdocs\seedout\storage\app/public/modules/applications/1/borrower_picture/picture_8.png