问题描述
我正在尝试使用 Laravel 8 在 S3 存储桶上上传图像,但它没有使用这个库上传我尝试使用其他库,对于它们,我可以在 S3 上上传图像,
这是我得到的错误截图: enter image description here
解决方法
您似乎无权在 S3 存储桶上上传图片。
请按照此解决问题。 https://stackoverflow.com/a/40098327/4227367
,我找到了问题的解决方案,我的 S3 存储桶是私有存储桶,这就是为什么无法访问它以访问私有存储我添加了此链接。
$media = $mediaUploader->fromSource($image)->makePrivate()->toDisk('s3')->upload();
这篇文章对我有帮助:Getting Error AccessDenied while upload file in S3 from Laravel-5.7