苹果手机上传图片报错

[ERROR]-[Thread: http-nio-8090-exec-2]-[com.lsk.util.Syslog.error()]: com.lsk.common.interceptor.ExceptionInterceptor.intercept(18)java.lang.RuntimeException: java.io.IOException: Posted content type isn't multipart/form-data

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

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

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

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

        at com.lsk.business.BeforBusinessController.findupload(BeforBusinessController.java:499)

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

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

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

        at java.lang.reflect.Method.invoke(Method.java:498)

        at com.jfinal.aop.Invocation.invoke(Invocation.java:73)

        at com.lsk.admin.interceptor.CrossDomainInterceptor.intercept(CrossDomainInterceptor.java:25)

        at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

        at com.lsk.common.interceptor.CacheInterceptor.intercept(CacheInterceptor.java:22)

        at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

        at com.lsk.common.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:16)

        at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

        at com.jfinal.core.ActionHandler.handle(ActionHandler.java:83)

        at com.lsk.handler.DruidStatViewHandlerRewrite.handle(DruidStatViewHandlerRewrite.java:75)

        at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)

        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)

        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)

        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:495)

        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:767)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1354)

        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:745)

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

        at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:168)

        at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:224)

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

        ... 40 more


评论区

zzutligang

2020-05-04 21:45

错误提示说,你的提交form不是multipart/form-data类型,检查一下吧

你妹啊

2020-05-06 11:42

@zzutligang ajax中加个类型吗?

热门反馈

扫码入社