rain
2024-07-30 c56112796e4b0a642cf187a2fa16ee5a271383b0
src/main/java/com/dji/sample/media/util/MinioFileDownloader.java
@@ -19,13 +19,13 @@
        this.bucketPath = bucketPath;
    }
    public void downloadAndZipFolders(List<String> prefixes, String localSaveDir) throws Exception {
    public void downloadAndZipFolders(List<String> prefixes, String localSaveDir,String filepath) throws Exception {
        // 创建目标文件夹路径并生成zip文件名
        Path localSavePath = Paths.get(localSaveDir);
        if (!Files.exists(localSavePath)) {
            Files.createDirectories(localSavePath);
        }
        String zipFileName = localSavePath.resolve("compressed_files.zip").toString();
        String zipFileName = localSavePath.resolve(filepath).toString();
        // 创建压缩文件输出流
        try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFileName))) {