敏哥gege的gravatar头像
敏哥gege2017-10-25 16:16:59

jquery图片上传实例

这个插件前台页面的文档可以查到,后台接收就没有说明了。这里介绍一下我用springmvc接收传向后台的值:

@RequestMapping("/admin/addImage.do")

    public ModelAndView handleRequest(HttpServletRequest request,

            HttpServletResponse response) throws Exception {

        MultipartResolver resolver = new CommonsMultipartResolver(request

                .getSession().getServletContext());

        MultipartHttpServletRequest multipartRequest = resolver

                .resolveMultipart(request);

         MultipartFile file = multipartRequest.getFile("fileList");

这个file就能获取前台post传出的值。

jquery图片上传实例

jquery图片上传实例

gif动图


打赏

文件名:h5-upload.zip,文件大小:117.25K下载
  • /
      • /html5up-150127225933
          • /html5up-150127225933/control
              • /html5up-150127225933/control/css
                • /html5up-150127225933/control/css/zyUpload.css
              • /html5up-150127225933/control/images
                • /html5up-150127225933/control/images/add_img.png
                • /html5up-150127225933/control/images/bg.png
                • /html5up-150127225933/control/images/delete_blue.png
                • /html5up-150127225933/control/images/delete_white.png
                  • /html5up-150127225933/control/images/fileType
    顶部客服微信二维码底部
    >扫描二维码关注最代码为好友扫描二维码关注最代码为好友