我收到了这个错误:
Unable to write file at location: profile-photos/rFfDwnJUhtTlcy87bDur4Co7q6UnDYEGRbdl6Bi0.jpg. Error executing "PutObject" on "https://xxx.s3.us-west-004.backblazeb2.com/profile-photos/rFfDwnJUhtTlcy87bDur4Co7q6UnDYEGRbdl6Bi0.jpg";
AWS HTTP error: Client error: `PUT https://xxx.s3.us-west-004.backblazeb2.com/profile-photos/rFfDwnJUhtTlcy87bDur4Co7q6UnDYEGRbdl6Bi0.jpg` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error>
<Code>InvalidRequest</Code>
<Message>The request (truncated...)
InvalidRequest (client): The request body was too small -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error>
<Code>InvalidRequest</Code>
<Message>The request body was too small</Message>
</Error>
当我使用这个代码时
Storage::disk('s3')->put('profile-photos', $photo);
将文件上传到Backblaze.我可能做错了什么,我该如何解决这个问题?
更新 在遵循了 comments 中的建议后,我得到了这个错误:
Unable to write file at location: profile-photos/0Oafj0VpwBbrMtvgLEnBmGl3UsL4rrUaD7HLzRDA.jpg. Error executing "PutObject" on "https://xxx.s3.us-west-004.backblazeb2.com/profile-photos/0Oafj0VpwBbrMtvgLEnBmGl3UsL4rrUaD7HLzRDA.jpg"; AWS HTTP error: Client error: `PUT https://xxx.s3.us-west-004.backblazeb2.com/profile-photos/0Oafj0VpwBbrMtvgLEnBmGl3UsL4rrUaD7HLzRDA.jpg` resulted in a `400 Bad Request` response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Error> <Code>InvalidArgument</Code> <Message>Unsupporte (truncated...) InvalidArgument (client): Unsupported value for canned acl 'private' - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Error> <Code>InvalidArgument</Code> <Message>Unsupported value for canned acl 'private'</Message> </Error>
但尽管出现了错误,文件上传还是成功的.