这是最新的日志
[DEBUG] 2017-11-14 13:21:43,198 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) - Found mapping for [POST] path=/jnccoss/img/upload/add : UploadModule.uploadImg(UploadModule.java:33)
[DEBUG] 2017-11-14 13:21:43,201 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'uploadModule'<class org.clso.oss.modules.UploadModule>
[DEBUG] 2017-11-14 13:21:43,202 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) - >> Load definition name=uploadModule
[DEBUG] 2017-11-14 13:21:43,204 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) - Found IocObject(uploadModule) in AnnotationIocLoader(packages=[org.clso.oss.modules])
[DEBUG] 2017-11-14 13:21:43,204 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) - >> Make...'uploadModule'<class org.clso.oss.modules.UploadModule>
[DEBUG] 2017-11-14 13:21:43,205 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class org.clso.oss.modules.UploadModule without AOP
[DEBUG] 2017-11-14 13:21:43,205 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) - Save object 'uploadModule' to [app]
[DEBUG] 2017-11-14 13:21:43,227 org.nutz.mvc.upload.UploadAdaptor.getReferObject(UploadAdaptor.java:184) - Select Html4 Form upload parser --> /img-manage/jnccoss/img/upload/add
[DEBUG] 2017-11-14 13:21:43,232 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:39) - FastUpload : /jnccoss/img/upload/add
[DEBUG] 2017-11-14 13:21:43,234 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:54) - info created
[DEBUG] 2017-11-14 13:21:43,234 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:60) - Params map created - 0 params
[DEBUG] 2017-11-14 13:21:43,236 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:77) - boundary:
--------FormBoundary4638u9hujsidkqd4nthhm5i1a8
[DEBUG] 2017-11-14 13:21:43,241 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:100) - skip first boundary
[DEBUG] 2017-11-14 13:21:43,241 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:111) - Reading...
[DEBUG] 2017-11-14 13:21:43,242 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[upload_bceeddde_c0b9_49f3_83d9_e14d3ae8933c_00000008.tmp],fieldName=[img]
[DEBUG] 2017-11-14 13:21:43,243 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:137) - Upload Info: name=upload_bceeddde_c0b9_49f3_83d9_e14d3ae8933c_00000008.tmp,content_type=application/octet-stream
[INFO ] 2017-11-14 13:21:43,244 org.nutz.mvc.adaptor.AbstractAdaptor.adapt(AbstractAdaptor.java:229) - Adapter Error catched , but I found AdaptorErrorContext param, so, set it to args, and continue
org.nutz.mvc.upload.UploadUnsupportedFileNameException: Unsupport file name 'upload_bceeddde_c0b9_49f3_83d9_e14d3ae8933c_00000008.tmp'
at org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:140)
at org.nutz.mvc.upload.UploadAdaptor.getReferObject(UploadAdaptor.java:186)
at org.nutz.mvc.upload.UploadAdaptor.getReferObject(UploadAdaptor.java:62)
at org.nutz.mvc.adaptor.AbstractAdaptor.adapt(AbstractAdaptor.java:224)
at org.nutz.mvc.upload.UploadAdaptor.adapt(UploadAdaptor.java:117)
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:28)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
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)
这是引用类,并没有你说的那个FastUploading呀
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.nutz.img.Images;
import org.nutz.lang.Files;
import org.nutz.lang.OS;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.AdaptBy;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.POST;
import org.nutz.mvc.annotation.Param;
import org.nutz.mvc.impl.AdaptorErrorContext;
import org.nutz.mvc.upload.FieldMeta;
import org.nutz.mvc.upload.TempFile;
import org.nutz.mvc.upload.UploadAdaptor;
这是第140左右的代码
// 作为文件读取
if (meta.isFile()) {
if (log.isDebugEnabled())
log.debugf("Upload Info: name=%s,content_type=%s", meta.getFileLocalName(),meta.getContentType());
// 检查是否通过文件名过滤
if (!context.isNameAccepted(meta.getFileLocalName())) {
throw new UploadUnsupportedFileNameException(meta);
}
// 检查是否通过文件类型过滤
if (!context.isContentTypeAccepted(meta.getContentType())) {
throw new UploadUnsupportedFileTypeException(meta);
}