七牛云直传文件报错 NextPart: EOF" Bad Request

新手上路,请多包涵

直接上传文件报错。
报错信息
"error":"invalid multipart format: multipart: NextPart: EOF"} Bad Request

我的请求信息:

POST / HTTP/1.1
Accept: /
Authorization: Acceskey:signature
Host: up.qiniu.com
Content-Type: multipart/form-data; boundary=------------------------7aa9c49f35d7c3fc
Content-Length: 8

返回的响应信息:

  • upload completely sent off: 8 out of 8 bytes

< HTTP/1.1 400 Bad Request
< Server: nginx/1.10.2
< Date: Wed, 04 Jul 2018 06:42:46 GMT
< Content-Type: application/json
< Content-Length: 62
< Connection: keep-alive
< Access-Control-Allow-Headers: X-File-Name, X-File-Type, X-File-Size
< Access-Control-Allow-Methods: OPTIONS, HEAD, POST
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: X-Log, X-Reqid
< Access-Control-Max-Age: 2592000
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< X-Content-Type-Options: nosniff
< X-Log: body/multipart: NextPart: EOF;UP/400
< X-Reqid: T2cAAFoRN4hSFz4V
< X-Svr: UP

传输的from data以下格式:
------------------------7aa9c49f35d7c3fc
Content-Disposition: form-data; name="file"; filename="gpossext.0.0"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary<00000000>
------------------------7aa9c49f35d7c3fc
Content-Disposition: form-data; name="token"< Acceskey:signature=>
------------------------7aa9c49f35d7c3fc
密钥部分就不展示了。目前怀疑是上传的from data格式错了,请指点具体格式怎么拼最好有例子??

阅读 7.3k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
logo
七牛云问答
子站问答
访问
宣传栏