NutzCN Logo
问答 上传文件接收不到文件求助
发布于 69天前 作者 wx_brcsh5uotpobd0t3h7ln 184 次浏览 复制 上一个帖子 下一个帖子
标签:
DEBUG] 10:32:41.060 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:54) - info created
[DEBUG] 10:32:41.061 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:60) - Params map created - 0 params
[DEBUG] 10:32:41.062 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:77) - boundary: 
------WebKitFormBoundarymsakWewAiHReUZRf
[DEBUG] 10:32:41.067 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:100) - skip first boundary
[DEBUG] 10:32:41.067 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:111) - Reading...
[DEBUG] 10:32:41.068 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[testtime]
[DEBUG] 10:32:41.068 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[testtime] value=[2020-06-04 10:25]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[testresult]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[testresult] value=[0]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[rid]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[rid] value=[92865,92866]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[pic]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[pic] value=[[object Object]]
[DEBUG] 10:32:41.069 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:231) - ...Done 459 bytes readed

上面这段日志是说明后台已经接收到pic文件参数了吧,但是

 @AdaptBy(type = UploadAdaptor.class)
    public Result testResult(String termialtype,String account,@Param("pic")File pic

我这个file文件确是空的,请问这是什么原因呢

4 回复

ajax不能直接上传文件,要么额外js插件,例如webupload,要么学学htmt5 file api

谁说的不能直接上传文件,问题解决了

自己研究解决才是硬道理

难道是借Ajax的壳,去提交form
此法似乎实现不了分块上传吧
如果仅是一个图片,转base64上传就是了,也很方便

添加回复
请先登陆
回到顶部