controller中的method
public void sceneFile() {
UploadFile aFile=getFile();
System.out.println(aFile.getFileName());
renderHtml("success");
}
前台的form
<form method="post" enctype="multipart/form-data" action="/backStage/sceneFile">
选择封面图片:
<input type="file" class="form-control" id="image">
<br>
<input type="submit" class="form-control" name="submit" style="float: right;" /></form>
项目:JFinal