七牛云存储 - java 用IoApi.Put方法提交一个图片到七牛中
伊谢尔伦
伊谢尔伦 2017-04-17 13:31:47
0
1
605

String uptoken = getUploadToken();
PutExtra extra = new PutExtra();
MultipartHttpServletRequest mhsr = (MultipartHttpServletRequest) request;
MultipartFile mFile = mhsr.getFile("f");
PutRet ret = IoApi.Put(uptoken, "xx.jpg",mFile.getInputStream(), extra)
然后 ret.response只是返回了一个0.。这是为什么

求大牛帮忙啊。。 在线等

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
Peter_Zhu

Can you provide your token? If ret.response only returns 0, then there are two situations. One is that the returnBody set in the upload strategy returns a variable with a value of 0; the other is Yes, in the upload strategy, the set callbackUrl responds to a {0} json when responding to the Qiniu callback.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template