有时候会有多个附件一起下载的需求,这个时候最好就是打包下载了 首先下面这段代码是正常的单个下载 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…
压缩文件相关的类: public class ZIPCompressUtil { public static Tuple<bool, Stream> Zip(string strZipTopDirectoryPath, int intZipLevel, string strPassword, string[] filesOrDirectoriesPaths) { try { List<string> AllFilesPath = new List<string>();…