/index.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd&qu
jsp页面js代码: function downloadAttached(){ var id = []; id.push(infoid); var options = {}; options.action = "${pageContext.request.contextPath}/DocumentController/downloadattached"; options.argname1="id"; options.argvalue1=id.join(','); f
有时候会有多个附件一起下载的需求,这个时候最好就是打包下载了 首先下面这段代码是正常的单个下载 public void Download(@RequestParam("file_path") String file_path, HttpServletResponse response) { logger.info("try to download file, the filePath : " + file_path); int i = file_path.lastI
数据库存储blob图片文件,前端打包下载 数据库图片文件实体类 package com.cmrh.mspserver.pos.dto; import java.io.Serializable; import org.springframework.format.annotation.DateTimeFormat; public class MspPosImage implements Serializable { private static final long serialVersionUI