0

直接上传文件报错。
报错信息
"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格式错了,请指点具体格式怎么拼最好有例子??

2018-07-04 提问

1 个回答

0

400是请求的问题
这个你可以看下sdk的的源码的实现
https://developer.qiniu.com/s...

你可能感兴趣的

推广链接