search

Home  >  Q&A  >  body text

七牛云存储 - java 用IoApi.Put方法提交一个图片到七牛中

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.。这是为什么

求大牛帮忙啊。。 在线等

伊谢尔伦伊谢尔伦2785 days ago628

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 13:33:47

    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.

    reply
    0
  • Cancelreply