开发者社区> 问答> 正文

OSS上传错误

kent911 2017-09-23 12:24:52 1915

用的是三级域名
QQ_20170923121829

|-----------------------Start---------------------------------------------------------------------------------------------------
|-Status:403
|-Body:
SecondLevelDomainForbidden The bucket you are attempting to access must be addressed using OSS third level domain. 59C5DDBAB47FB85F40976CA9 oss-cn-hangzhou.aliyuncs.com
|-Header:
Array ( [server] => AliyunOSS [date] => Sat, 23 Sep 2017 04:06:18 GMT [content-type] => application/xml [content-length] => 305 [connection] => keep-alive [x-oss-request-id] => 59C5DDBAB47FB85F40976CA9 [_info] => Array ( [url] => http://oss-cn-hangzhou.aliyuncs.com/mingpianhome/d/file/design/tyhy/2017-09-23/1200159c5ddbaa57f9.jpg [content_type] => application/xml [http_code] => 403 [header_size] => 227 [request_size] => 481 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.01286 [namelookup_time] => 1.8E-5 [connect_time] => 0.001997 [pretransfer_time] => 0.002069 [size_upload] => 95307 [size_download] => 305 [speed_download] => 23716 [speed_upload] => 7411119 [download_content_length] => 305 [upload_content_length] => 95307 [starttransfer_time] => 0.004219 [redirect_time] => 0 [certinfo] => Array ( ) [redirect_url] => [method] => PUT ) [x-oss-request-url] => http://oss-cn-hangzhou.aliyuncs.com/mingpianhome/d/file/design/tyhy/2017-09-23/1200159c5ddbaa57f9.jpg [x-oss-redirects] => 0 [x-oss-stringtosign] => PUT image/jpeg Sat, 23 Sep 2017 04:06:18 GMT /mingpianhome/d/file/design/tyhy/2017-09-23/1200159c5ddbaa57f9.jpg [x-oss-requestheaders] => Array ( [Content-Type] => image/jpeg [Date] => Sat, 23 Sep 2017 04:06:18 GMT [Host] => oss-cn-hangzhou.aliyuncs.com [Authorization] => OSS LTAIKIEBJmbMfu6w:AUpOMzjZmA0OBaA+iIUMm6SvEsQ= ) ) -----------------------End-----------------------------------------------------------------------------------------------------

XML 对象存储 数据格式
分享到
取消 提交回答
全部回答(2)
  • 桃桃@@
    2019-07-17 21:36:41

    错误信息已经提示了,访问oss现在不能使用二级域名,必须使用三级域名的方式,简单来说,二级域名的形式是:host/bucket/object,而三级域名的形式是bucket.host/object,看一下你程序里面host的格式

    0 0
  • 小锤子儿
    2019-07-17 21:36:41

    阿里不是提供了专门的工具了吗?直接使用就可以了。为什么要自己写呢?自己写的容易出错。不如直接用阿里提供的现成的程序呢

    0 0
添加回答
+ 订阅

时时分享云计算技术内容,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。

推荐文章
相似问题