存储::移动给出“在路径:找不到文件". Laravel与Ubuntu [英] Storage::move giving "File not found at path:" Laravel with Ubuntu
本文介绍了存储::移动给出“在路径:找不到文件". Laravel与Ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想移动一些文件
Storage::move('posts/temp/'.$val,'photos/'.$post->id.'/'.$val);
但是它给了我
File not found at path: home/vagrant/Code/......
要寻找一些特殊的配置吗?顺便说一句,该文件确实位于未找到的路径.
is there some special configuration to look for? Btw, the file is indeed at the not found path.
推荐答案
您需要添加正在使用的disk()
详细信息,例如,如果您正在使用亚马逊s3
,则需要在移动之前添加disk('s3')
代码将是:
You need to add disk()
detail that you are using for example if you are using amazon s3
you need to add disk('s3')
before move so the code will be:
Storage::disk('s3')->move('posts/temp/'.$val,'photos/'.$post->id.'/'.$val);
这篇关于存储::移动给出“在路径:找不到文件". Laravel与Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文