4
回答
JFinal表单和附件一起提交问题
注册华为云得mate10,2.9折抢先购!>>>   
    public void saveBasicInfo() {
        String local = "e:/pic";
        int maxSize = 10 * 1024 * 1024;
        UploadFile pic = getFile(getPara("basicInfo.pic"),"e:/file/pic");
        Basicinfo basicInfo = getModel(Basicinfo.class);
        String userID = CommonUtils.getBusiId();
        basicInfo.set("userid",userID);
        basicInfo.set("pic", pic);

      }

这是单个图片提交,没有问题.只提交表单也没问题,就是两个一起提交会出问题Posted content type isn't multipart/form-data. 前端form 有加 enctype="multipart/form-data",附件和表单 单独form提交没问题,合在一起就报错,求教@JFinal

举报
顶部