开发者社区> 问答> 正文

OSS上传错误

用的是三级域名
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-----------------------------------------------------------------------------------------------------

展开
收起
kent911 2017-09-23 12:24:52 5125 0
2 条回答
写回答
取消 提交回答
  • 错误信息已经提示了,访问oss现在不能使用二级域名,必须使用三级域名的方式,简单来说,二级域名的形式是:host/bucket/object,而三级域名的形式是bucket.host/object,看一下你程序里面host的格式

    2019-07-17 21:36:41
    赞同 展开评论 打赏
  • 阿里不是提供了专门的工具了吗?直接使用就可以了。为什么要自己写呢?自己写的容易出错。不如直接用阿里提供的现成的程序呢

    2019-07-17 21:36:41
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载