Laravel 5.1似乎没有向S3上传添加配置值 [英] Laravel 5.1 seems not to be adding config values to S3 Upload

查看:152
本文介绍了Laravel 5.1似乎没有向S3上传添加配置值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在laravel应用中使用s3进行文件存储,但是由于某些奇怪的原因,我遇到了这个错误

I want to use s3 for file storage in my laravel app, but for some weird reason I am getting this error

WrappedHttpHandler.php第159行中的

S3Exception: 在" https://s3上执行"PutObject"时出错. your-region.amazonaws.com/your-bucket/halls/3edf6142206cc1851fc05fa8730e34eb-1.jpeg "; AWS HTTP错误:cURL错误6:无法解析主机:s3.your-region.amazonaws.com(请参阅 http://curl.haxx.se/libcurl/c/libcurl-errors.html )

S3Exception in WrappedHttpHandler.php line 159: Error executing "PutObject" on "https://s3.your-region.amazonaws.com/your-bucket/halls/3edf6142206cc1851fc05fa8730e34eb-1.jpeg"; AWS HTTP error: cURL error 6: Could not resolve host: s3.your-region.amazonaws.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

所以我想我的配置值不能反映在s3上传中.

So am thinking that my config values arent reflected in the s3 upload.

推荐答案

我想我终于明白了.每当您对环境文件或配置文件进行任何更改时,建议始终运行php artisan config:cache.因此,这将清除旧的配置缓存并使用新值进行更新.

I think I finally figured it out. Anytime you make any changes to either the environment file or the config file it is advised to always run php artisan config:cache So this clears the old config cache and update with the new values.

这篇关于Laravel 5.1似乎没有向S3上传添加配置值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆