[英]I am trying to download file through my application but am getting this error
this is the error这是错误
Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException The file "http://127.0.0.1:5600/public/postVideos" does not exist
Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException 文件“http://127.0.0.1:5600/public/postVideos”不存在
this is my controller这是我的控制器
function getFile($post){
return response()->download(asset('public/postVideos'));
// return Storage::download('file.jpg', $post);
}
Tyr to use this: Tyr 使用这个:
$my_file = my_file_get_contents("http://127.0.0.1/public/postVideos/file.jpg"); $my_file = my_file_get_contents("http://127.0.0.1/public/postVideos/file.jpg"); var_dump($my_file);
var_dump($my_file);
Please Remember to vote on my answer.请记住对我的答案投票。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.