简体   繁体   English

我正在尝试通过我的应用程序下载文件,但出现此错误

[英]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.

相关问题 我正在尝试将多个图像下载为 zip 文件,但使用 laravel 7 时出错 - I am trying to download multiple image as a zip file but getting error using laravel 7 为什么在尝试加载模型时出现应用程序错误? - Why am I getting Application error while trying to load a model? 尝试在我的实时网站上上传文件时,我遇到了move_uploaded_file错误 - I am getting error for move_uploaded_file while trying to upload file on my live site 我的.htaccess文件出现以下错误 - I am getting the following error with my .htaccess file 我正在尝试从mysql下载文件,我将文件位置保存在数据库中,现在我正在尝试为页面上的用户创建下载链接 - I am trying to download a file from mysql, I saved the file location in the database, now I am trying to make a download link for the user on my page 我在本地主机中获取文件树 - I am getting file tree in my localhost 我在magento网站中收到错误消息 - I am getting the error in my magento site 我正在尝试通过串行端口与微控制器通信。 但是我的PHP脚本给我一个错误 - I am trying to communicate with a micro controller through a serial port . but my php script is giving me an error 我试图在在线主机上运行我的网站,但我不断收到错误消息 - I am trying to run my website on an online host but i keep getting an error 为什么在尝试关闭 zip 文件时出现错误“无法创建临时文件”? - Why am I getting error "Failure to create temporary file" when trying to close a zip file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM