大家好,我在meteor中,使用cordova的插件cordova:cz.blocshop.socketsforcordova,通过OSS的API,上传wav文件。
上传的文件小于132261字节的时候,瞬间上传成功,OSS返回200。
上传的文件大于132261字节的时候,发送完文件的byte数组,OSS不返回任何数据,过一会,提示Removing socket adapter from storage. 正常的退出了。我认为是超时了,自动断开的链接。
------------------这是小于132261字节的wav,瞬间成功------------------
2015-05-09 23:38:57.748 PrayDemo2[3606:60b] file size: 56196
2015-05-09 23:38:57.803 PrayDemo2[3606:8503] Setting up connection to crying.oss-cn-hangzhou.aliyuncs.com : 80
2015-05-09 23:38:57.804 PrayDemo2[3606:8503] Resolving host: crying.oss-cn-hangzhou.aliyuncs.com
2015-05-09 23:38:58.879 PrayDemo2[3606:8503] Resolved ip: 112.124.219.91
2015-05-09 23:38:59.189 PrayDemo2[3606:60b] connected!
2015-05-09 23:38:59.190 PrayDemo2[3606:60b] strHttpHeader: PUT /audio_001.wav HTTP/1.1
Content-Length: 56196
Content-Type: audio/wav
Host: crying.oss-cn-hangzhou.aliyuncs.com
Date: Sat, 09 May 2015 15:38:57 GMT
Authorization: OSS HvB__________Jfz:6FfqJA/K9fHbgK58YqdeV7Yo3Wg=
2015-05-09 23:38:59.190 PrayDemo2[3606:60b] strHttpHeader length: 218
2015-05-09 23:38:59.190 PrayDemo2[3606:60b] bytesFile length: 56196
2015-05-09 23:38:59.191 PrayDemo2[3606:60b] all socketData length: 56414
2015-05-09 23:38:59.191 PrayDemo2[3606:60b] sent!
2015-05-09 23:38:59.661 PrayDemo2[3606:60b] Removing socket adapter from storage.
2015-05-09 23:38:59.663 PrayDemo2[3606:60b] received: HTTP/1.1 200 OK
Date: Sat, 09 May 2015 15:38:59 GMT
Content-Length: 0
Connection: close
ETag: "95EF417FE78881AF3850C6B7624412E7"
Server: AliyunOSS
x-oss-request-id: 554E2A1227A4041954201FAB
2015-05-09 23:38:59.664 PrayDemo2[3606:60b] ERROR: is hasError: false
--------------------下面是大于132261字节的wav,看上去是超时。--------------------
2015-05-09 23:16:57.123 PrayDemo2[3549:60b] file size: 324006
2015-05-09 23:16:57.363 PrayDemo2[3549:7407] Setting up connection to 192.168.1.39 : 8000
2015-05-09 23:16:57.925 PrayDemo2[3549:60b] connected!
2015-05-09 23:16:57.926 PrayDemo2[3549:60b] strHttpHeader: PUT /audio_001.wav HTTP/1.1
Content-Length: 324006
Content-Type: audio/wav
Host: 192.168.1.39
Date: Sat, 09 May 2015 15:16:57 GMT
Authorization: OSS HvB__________Jfz:/Rm9ahGzYzxkqLulsDwu/Iu77ak=
2015-05-09 23:16:57.926 PrayDemo2[3549:60b] strHttpHeader length: 196
2015-05-09 23:16:57.926 PrayDemo2[3549:60b] bytesFile length: 324006
2015-05-09 23:16:57.927 PrayDemo2[3549:60b] all socketData length: 324202
2015-05-09 23:16:57.927 PrayDemo2[3549:60b] sent!
2015-05-09 23:19:16.891 PrayDemo2[3549:60b] Removing socket adapter from storage.
2015-05-09 23:19:16.896 PrayDemo2[3549:60b] ERROR: is hasError: false
有可能是什么原因呢,我没有思路了,请大家帮助,感谢,感谢!!!
-------------------------
-------------------------
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。