开发者社区> 问答> 正文

OSS上传语音文件上传成功浏览器下载是0KB

上传之后返回的状态码是200,浏览器打开链接地址后,下载都是0KB?
同样的方法上传图片,图片是好的,为什么?

展开
收起
sodjfi44 2015-08-12 14:01:24 9176 0
4 条回答
写回答
取消 提交回答
  • 上传成功但是没有内容啊。跟文件类型是没有关系的。
    再看看本地的文件长度?
    2015-08-13 09:34:06
    赞同 展开评论 打赏
  • 图片或者语音对oss是一样的,建议使用oss sdk或者osscmd等工具查看一下内容
    2015-08-12 19:31:45
    赞同 展开评论 打赏
  • 回1楼徇云一五的帖子
    语音就是其实就是上传文件的意思啊(.mp3, .txt,  .html 等等)
    我打印出来,没有出错信息,状态码 status == 200
    同样的方法上传图片,图片是好的,
    难道说OSS 只能上传图片????

    file-1-24d1cc0ed952b.html

    ResponseCore Object
    (
        [header] => Array
            (
                [date] => Wed, 12 Aug 2015 03:43:41 GMT
                [content-length] => 0
                [connection] => close
                [etag] => "D41D8CD98F00B204E9800998ECF8427E"
                [server] => AliyunOSS
                [x-oss-request-id] => 55CAC0ED9C75D63399FE003E
                [_info] => Array
                    (
                        [url] => oss-cn-hangzhou.aliyuncs.com/jkwenzhen/file-1-24d1cc0ed952b.html
                        [content_type] =>
                        [http_code] => 200
                        [header_size] => 224
                        [request_size] => 431
                        [filetime] => -1
                        [ssl_verify_result] => 0
                        [redirect_count] => 0
                        [total_time] => 0.016942
                        [namelookup_time] => 0.003735
                        [connect_time] => 0.005617
                        [pretransfer_time] => 0.005625
                        [size_upload] => 0
                        [size_download] => 0
                        [speed_download] => 0
                        [speed_upload] => 0
                        [download_content_length] => 0
                        [upload_content_length] => 0
                        [starttransfer_time] => 0.016911
                        [redirect_time] => 0
                        [certinfo] => Array
                            (
                            )

                        [method] => PUT
                    )

                [x-oss-request-url] => oss-cn-hangzhou.aliyuncs.com/jkwenzhen/file-1-24d1cc0ed952b.html
                [x-oss-redirects] => 0
                [x-oss-stringtosign] => PUT

    application/octet-stream
    Wed, 12 Aug 2015 03:43:41 GMT
    /jkwenzhen/file-1-24d1cc0ed952b.html
                [x-oss-requestheaders] => Array
                    (
                        [Content-Type] => application/octet-stream
                        [Date] => Wed, 12 Aug 2015 03:43:41 GMT
                        [Host] => oss-cn-hangzhou.aliyuncs.com
                        [Authorization] => OSS PXfVJqZQVy9WnXzJ:7HJohqY/O1SE6XPoIKXkdNa9MzY=
                    )

            )

        [body] =>
        [status] => 200
    )
    2015-08-12 18:12:39
    赞同 展开评论 打赏
  • OSS传语音?还是第一次听过,可以贴出代码或出错信息不?

    -------------------------

    下载下来试一下啦

    2015-08-12 17:25:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

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