Java cannot get file when uploading a file.

based on the framework of DUBBO,SSM and easyui, I wrote a function of uploading pictures, uploading and sharing music, and now I can"t get that file

tomcat

in controller.
<form id="upload_form" enctype="multipart/form-data" action="/shop/upload_deal" method="post">
  <input class="easyui-filebox" style="width:300px" data-options="onChange:change_photo" type="file" id="file_upload" name="file"/><br/>
  <input type="submit" value="" /> <br/>
</form>

  String filePath = request.getSession().getServletContext()
                .getRealPath("/") + "upload/" + multipartFilefile.getOriginalFilename();
        System.out.println(filePath);
        File saveDir = new File(filePath);

        ImageUtils.ImageUpload(saveDir);//File

did I write something wrong, or I would like to ask where I put the picture when I submitted the picture and passed it to controller from the front end?

Mar.10,2021

first check whether the frontend has obtained the address of the image. If so, then check whether the address is obtained when receiving it at the backend, and then check whether it is the problem of the frontend or the backend


if the controller does not receive the file, please check whether the configuration is correct
if the controller receives the file, please check whether there is a upload folder under the target package.
after your project is released, the files are all saved in the target package


try to change the request parameters in Controller MultiparFile miltiparFilefile to MultiparFile file

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b372e3-2c067.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b372e3-2c067.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?