Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取url的时候提示 This driver does not support retrieving URLs #7

Closed
lepig opened this issue Dec 4, 2018 · 7 comments
Closed

Comments

@lepig
Copy link

lepig commented Dec 4, 2018

上传成功后我使用Storage::file('xxx')调用的时候返回如下错误
qq 20181204162346

@lepig
Copy link
Author

lepig commented Dec 4, 2018

代码 如下

qq 20181204162447

@apollopy
Copy link
Owner

apollopy commented Dec 4, 2018

我没有太看懂你的意图,你是想干嘛?

@apollopy
Copy link
Owner

apollopy commented Dec 4, 2018

你用的是 laravel 5.3 吧?目前我自己的项目用的是 5.2,所以没很好的支持 laravel 的 url 方法。你可以先使用 SignedDownloadUrl。

@lepig
Copy link
Author

lepig commented Dec 4, 2018

@apollopy 我用的是5.5。我是想上传后获取图片的地址。比如修改头像后,存到数据库。然后想拿到完整的地址,类似http://bucket.oss.com/avatar.png

我是Storage::url('avatar.png')报了这个错。

@apollopy
Copy link
Owner

apollopy commented Dec 4, 2018

@apollopy 我用的是5.5。我是想上传后获取图片的地址。比如修改头像后,存到数据库。然后想拿到完整的地址,类似http://bucket.oss.com/avatar.png

我是Storage::url('avatar.png')报了这个错。

laravel 从 5.3 开始支持 Storage::url 的,我这边项目还是 5.2 呢……我自己项目里,因为类似头像地址这样的需求,我是存 CDN 的地址,而不是 OSS 的地址的,所以就没急着加这个……

@apollopy
Copy link
Owner

apollopy commented Dec 4, 2018

@apollopy 我用的是5.5。我是想上传后获取图片的地址。比如修改头像后,存到数据库。然后想拿到完整的地址,类似http://bucket.oss.com/avatar.png

我是Storage::url('avatar.png')报了这个错。

后续会加……

@lepig
Copy link
Author

lepig commented Dec 5, 2018

@apollopy 好的 谢谢。那我自己处理一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants