APP 接口: 提交图片正常,故意不提交图片异常。


此行报错:   UploadFile uf = getFile("image");

java.lang.RuntimeException: java.io.IOException: Posted content type isn't multipart/form-data


at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:123)

at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:68)

at com.jfinal.core.Controller.getFiles(Controller.java:767)

at com.jfinal.core.Controller.getFile(Controller.java:777)

at com.ry.io.rong.api.AppRongYunApi.reportUser(AppRongYunApi.java:2664)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


评论区

JFinal

2017-03-16 17:42

异常提示已经很明确: Posted content type isn't multipart/form-data

zzhkiller

2017-03-17 09:31

form 加入 enctype="multipart/form-data"

热门反馈

扫码入社