开发者社区> 问答> 正文

xutils android上传图片,服务器怎么接收处理?报错

请教一下:

xutils在上传图片的时候,java服务器怎么做接收操作啊,用jfinal getfile时报错


java.lang.RuntimeException: java.io.IOException: Corrupt form data: premature ending
at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:121)
at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:59)
at com.jfinal.core.Controller.getFiles(Controller.java:600)
at com.jfinal.core.Controller.getFile(Controller.java:607)
at com.langya.controller.H_Users_Controller.addPics(H_Users_Controller.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)


谢谢

展开
收起
爱吃鱼的程序员 2020-06-22 14:24:18 723 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    xutilsQQ群共享里jsp文件上传简单的例子你可以先用jsp页面测试上传成功再用xutils上传

    2020-06-22 14:24:36
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
如何运维千台以上游戏云服务器 立即下载
网站/服务器取证 实践与挑战 立即下载
ECS计算与存储分离架构实践 立即下载