Laravel下载存储文件时无法获取file_size问题求助
Laravel存储文件下载失败问题
尝试从storage文件夹下载文件失败,已测试两种常见下载方式均无效,确认文件实际存在于指定路径,疑似与Flysystem相关。
使用的代码示例
方式一:直接使用response下载
return response()->download(storage_path("app\public\uploads\1662531990_Dropshipping.docx"));
方式二:通过Storage门面下载
return Storage::disk('public')->download("app\public\uploads\1662531990_Dropshipping.docx", "1662531990_Dropshipping");
相关Composer包版本
league/config v1.1.1 Define configuration arrays with strict schemas and validation league/flysystem 3.2.1 File storage abstraction for PHP league/flysystem-aws-s3-v3 3.0.0 AWS S3 filesystem adapter for Flysystem. league/mime-type-detection 1.11.0 Mime-type detection for Flysystem
相关截图
- 目录截图:

- 错误截图:

内容的提问来源于stack exchange,提问作者Faizan Kamal
相关产品推荐
相关产品推荐

