在flarum配置fofUpload插件上传到阿里云oss时,报错:'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on
。
console面板详细报错内容:文章来源:https://www.toymoban.com/news/detail-502930.html
Application.tsx:574 exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on "https://xxxx.oss-cn-hangzhou.aliyuncs.com/2022-08-20/1660954625-773775-00c7298020a7478e88407a5f0935defd0.jpg"; AWS HTTP error: Client error: `PUT https://xxxx.oss-cn-hangzhou.aliyuncs.com/2022-08-20/1660954625-773775-00c7298020a7478e88407a5f0935defd0.jpg` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>AWS authentication requires a vali (truncated...)
AccessDenied (client): AWS authentication requires a valid Date or x-amz-date header - <?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>AWS authentication requires a valid Date or x-amz-date header</Message>
<RequestId>6301BC54FDF078383403D950</RequestId>
<HostId>xxxx.oss-cn-hangzhou.aliyuncs.com</HostId>
</Error>
'
原因是系统日期错误,执行ntpdate ntp.api.bz
更新系统时间后解决。ntpdate可以通过yum install -y ntpdate
来安装。文章来源地址https://www.toymoban.com/news/detail-502930.html
到了这里,关于‘Aws\S3\Exception\S3Exception‘ with message ‘Error executing “PutObject“ on的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!