简体   繁体   中英

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

this is my controller

function getFile($post){
  return response()->download(asset('public/postVideos'));
  // return Storage::download('file.jpg', $post);
}

Tyr to use this:

$my_file = my_file_get_contents("http://127.0.0.1/public/postVideos/file.jpg"); var_dump($my_file);

Please Remember to vote on my answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM