开发者社区> 问答> 正文

OSS不能通过内网上传文件

PHP SDK调用upload_file_by_file()上传文件时,
若指定oss-cn-beijing.aliyuncs-internal.com会导致上传不成功,
可改成oss-cn-beijing.aliyuncs.com就没有问题,请问怎么解决?谢谢。
Array (
    [0] => ResponseCore Object (
        [header] => Array (
            [oss-request-url] => http://mybucket.oss-cn-beijing.aliyuncs-internal.com/lz/tu.png
            [oss-redirects] => 0
            [oss-stringtosign] => PUT image/png Sun, 22 Nov 2015 09:05:20 GMT x-oss-server-side-encryption:AES256 /mybucket/lz/tu.png
            [oss-requestheaders] => Array (
                [Cache-Control] => no-cache
                [Content-Disposition] => attachment;filename=oss_download.gz
                [Content-Encoding] => utf-8
                [Content-Language] => zh-CN
                [Content-Type] => image/png
                [Date] => Sun, 22 Nov 2015 09:05:20 GMT
                [Expires] => Fri, 28 Feb 2016 05:38:42 GMT
                [Host] => mybucket.oss-cn-beijing.aliyuncs-internal.com
                [x-oss-server-side-encryption] => AES256
                [Authorization] => OSS 此处略:若干字
            )
        )
        [body] => [status] =>
    )
)


展开
收起
mucairen 2015-11-22 17:14:14 9477 0
3 条回答
写回答
取消 提交回答
  • ReOSS不能通过内网上传文件
    感恩各位善答!
    2015-12-01 22:19:29
    赞同 展开评论 打赏
  • OSS已经开通的区域以及访问的域名表(Endpoint)
    http://help.aliyun.com/document_detail/oss/user_guide/oss_concept/endpoint.html?spm=5176.product8314910_oss.6.70.4MbM5r

    OSS开通Region和Endpoint对照表

    Endpoint各区域的内外网设置如下:

    Region中文名称    Region英文表示    外网Endpoint    ECS访问的内网Endpoint
    杭州数据中心    oss-cn-hangzhou    oss-cn-hangzhou.aliyuncs.com    oss-cn-hangzhou-internal.aliyuncs.com
    青岛数据中心    oss-cn-qingdao    oss-cn-qingdao.aliyuncs.com    oss-cn-qingdao-internal.aliyuncs.com
    北京数据中心    oss-cn-beijing    oss-cn-beijing.aliyuncs.com    oss-cn-beijing-internal.aliyuncs.com
    香港数据中心    oss-cn-hongkong    oss-cn-hongkong.aliyuncs.com    oss-cn-hongkong-internal.aliyuncs.com
    深圳数据中心    oss-cn-shenzhen    oss-cn-shenzhen.aliyuncs.com    oss-cn-shenzhen-internal.aliyuncs.com
    上海数据中心    oss-cn-shanghai    oss-cn-shanghai.aliyuncs.com    oss-cn-shanghai-internal.aliyuncs.com
    美国硅谷数据中心    oss-us-west-1    oss-us-west-1.aliyuncs.com    oss-us-west-1-internal.aliyuncs.com
    亚太(新加坡)数据中心    oss-ap-southeast-1    oss-ap-southeast-1.aliyuncs.com    oss-ap-southeast-1-internal.aliyuncs.com
    2015-11-22 19:20:01
    赞同 展开评论 打赏
  • Aliyun OSS 研发,专注存储高性能
    ReOSS不能通过内网上传文件
    oss-cn-beijing.aliyuncs-internal.com 内网域名用错了, 改成oss-cn-beijing-internal.aliyuncs.com试试看
    2015-11-22 17:25:57
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

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