我用oss上传图片 一开始endpoint = "oss-cn-beijing.aliyuncs.com" 这么配置的,报这个
<Error>
<Code>SecondLevelDomainForbidden</Code>
<Message>The bucket you are attempting to access must be addressed using
OSS
third level domain.</Message>
<RequestId>57CAE38730EFD8702665F381</RequestId>
<HostId>oss-cn-shenzhen-internal.aliyuncs.com</HostId>
</Error>
错误,然后配置
endpoint = "bucketname.oss-cn-beijing.aliyuncs.com",又报这个错误
<?xml version="1.0" encoding="UTF-8"?>
<Error> <Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
<RequestId>5810199E6FF1C5155B176C19</RequestId>
<HostId>dmyjr.oss-cn-beijing.aliyuncs.com</HostId>
<OSSAccessKeyId>LTAI6hvuJxtnmjG8</OSSAccessKeyId>
<SignatureProvided>Y09+auJxdhei00FPn9H6YxuUEzM=</SignatureProvided>
<StringToSign>PUT application/octet-stream Wed, 26 Oct 2016 02:49:15 GMT /dmyjr/dmyjr/20161026/22194147745015579392.png</StringToSign>
<StringToSignBytes>50 55 54 0A 0A 61 70 70 6C 69 63 61 74 69 6F 6E 2F 6F 63 74 65 74 2D 73 74 72 65 61 6D 0A 57 65 64 2C 20 32 36 20 4F 63 74 20 32 30 31 36 20 30 32 3A 34 39 3A 31 35 20 47 4D 54 0A 2F 64 6D 79 6A 72 2F 64 6D 79 6A 72 2F 32 30 31 36 31 30 32 36 2F 32 32 31 39 34 31 34 37 37 34 35 30 31 35 35 37 39 33 39 32 2E 70 6E 67 </StringToSignBytes> </Error> ,求助应该怎么改
-------------------------
楼主是否使用的是1.x版本的php sdk?升级到2.x版本应该可以解决这个问题
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。