Commit b2af7ed1 authored by 赵啸非's avatar 赵啸非

添加文件压缩

parent e02fc45e
......@@ -325,7 +325,8 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(filePath, "/", false)));
IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush();
zip.closeEntry();
} catch (Exception e) {
log.error("异常", e);
}
......@@ -352,6 +353,8 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
//byte[] bytes = FileUtil.readBytes(zipFile);
IOUtils.closeQuietly(zip);
return Rest.ok(outputStream.toByteArray());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment