开发者社区> 问答> 正文

本地上传文件到OSS是正常的,在ECS服务器上传都是0kb,也没有返回什么错误

C59B23AA_EDAC_49EB_ACA4_6E77886757EB

上传返回信息如下:
array(6) {
["fileUpload"]=>
string(60) "./Uploads/file/20160728/756362c2072744e639016f9ec9d8d5e7.jpg"
["Content-Type"]=>
string(10) "image/jpeg"
["method"]=>
string(3) "PUT"
["bucket"]=>
string(6) "sdzimg"
["object"]=>
string(58) "Uploads/file/20160728/756362c2072744e639016f9ec9d8d5e7.jpg"
["Content-Length"]=>
int(68174)
}
object(OSSHttpResponseCore)#16 (3) {
["header"]=>
array(13) {

["server"]=>
string(9) "AliyunOSS"
["date"]=>
string(29) "Thu, 28 Jul 2016 14:04:30 GMT"
["content-length"]=>
string(1) "0"
["connection"]=>
string(10) "keep-alive"
["x-oss-request-id"]=>
string(24) "579A10EECCB80C2A2AA348FD"
["etag"]=>
string(34) ""D41D8CD98F00B204E9800998ECF8427E""
["x-oss-hash-crc64ecma"]=>
string(1) "0"
["x-oss-server-time"]=>
string(2) "48"
["_info"]=>
array(24) {
  ["url"]=>
  string(101) "http://sdzimg.oss-cn-shanghai.aliyuncs.com/Uploads/file/20160728/756362c2072744e639016f9ec9d8d5e7.jpg"
  ["content_type"]=>
  NULL
  ["http_code"]=>
  int(200)
  ["header_size"]=>
  int(252)
  ["request_size"]=>
  int(505)
  ["filetime"]=>
  int(-1)
  ["ssl_verify_result"]=>
  int(0)
  ["redirect_count"]=>
  int(0)
  ["total_time"]=>
  float(0.518144)
  ["namelookup_time"]=>
  float(0.458695)
  ["connect_time"]=>
  float(0.464335)
  ["pretransfer_time"]=>
  float(0.464338)
  ["size_upload"]=>
  float(0)
  ["size_download"]=>
  float(0)
  ["speed_download"]=>
  float(0)
  ["speed_upload"]=>
  float(0)
  ["download_content_length"]=>
  float(0)
  ["upload_content_length"]=>
  float(0)
  ["starttransfer_time"]=>
  float(0.518106)
  ["redirect_time"]=>
  float(0)
  ["redirect_url"]=>
  string(0) ""
  ["primary_ip"]=>
  string(13) "139.196.65.25"
  ["certinfo"]=>
  array(0) {
  }
  ["method"]=>
  string(3) "PUT"
}
["oss-request-url"]=>
string(101) "http://sdzimg.oss-cn-shanghai.aliyuncs.com/Uploads/file/20160728/756362c2072744e639016f9ec9d8d5e7.jpg"
["oss-redirects"]=>
int(0)
["oss-stringtosign"]=>
string(112) "PUT

image/jpeg
Thu, 28 Jul 2016 14:04:29 GMT
/sdzimg/Uploads/file/20160728/756362c2072744e639016f9ec9d8d5e7.jpg"

["oss-requestheaders"]=>
array(4) {
  ["Content-Type"]=>
  string(10) "image/jpeg"
  ["Date"]=>
  string(29) "Thu, 28 Jul 2016 14:04:29 GMT"
  ["Host"]=>
  string(35) "sdzimg.oss-cn-shanghai.aliyuncs.com"
  ["Authorization"]=>
  string(49) "OSS hkamX8BnokV1RVWh:I53Rtk2CvLYTn9ZNpxOXYASJwb0="
}

}
["body"]=>
string(0) ""
["status"]=>
int(200)
}

展开
收起
数豆者 2016-07-28 22:31:36 5781 0
1 条回答
写回答
取消 提交回答
  • 码农|Coder| Pythonista

    我觉得,你上传时,检查下你的源文件,可能是源文件出现了问题,源文件不存在,或为空。

    2019-07-17 20:01:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

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