首页 文章

Amazon S3存储Wagtail媒体文件 - 仅在Heroku上出现服务器500错误

提问于
浏览
0

我一直关注Using Amazon S3 to Store Wagtail Media Files博客文章,设置亚马逊s3来存储我的wagtail媒体文件

这在我的本地开发服务器上完美运行(所有图像都按预期显示在S3存储桶中) . 但是在Heroku上部署时,我发现服务器500错误,就像上传器完成并且图像没有保存在S3存储桶中一样 . 除此行之外,heroku日志中没有详细信息 . 这使得调试非常困难 . 我没有使用S3作为我的静态资产(这些是由whitenoise处理的 . 将debug更改为True没有任何区别 . 任何建议都非常感谢 .

2018-08-19T16:56:43.517786 00:00 app [web.1]:10.7.223.133 - - [19 / Aug / 2018:16:56:43 0000]“POST / admin / images / multiple / add / HTTP / 1.1“500 363”https://isawebsite.herokuapp.com/admin/images/multiple/add/

enter image description here

github repo

更新:通过django-admin界面尝试图像上传而不是wagtail uploader我得到了更多信息性错误消息 . An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records. 我不明白这一点,因为我的.env文件中的键肯定是正确的,并被推送到heroku配置 . 密钥在本地和AWS CLI中工作 .

1 回答

相关问题