xiangpei
2025-02-18 8b3313c5b26855355b40067eeb3678fd3476baf1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java
@@ -48,10 +48,13 @@
        for (String str : list) {
            String password = str.substring(0, 6);
            String fileName = str.substring(6, str.length());
            InputStream input = FtpApche.downloadFileFromDailyDir(str);
            System.out.println("file name is:" + fileName);
            log.error("file name is:" + fileName);
            InputStream input = FtpApche.downloadFileFromDailyDir(str, this.ftpConfig);
            byte[] fileBytesByName = FtpApche.getFileBytesByName(input);
            OssClient storage = OssFactory.instance();
            MockMultipartFile mockMultipartFile = new MockMultipartFile(fileName, fileName, fileName.substring(14, fileName.length()), input);
            String contentType = fileName.length() >= 14 ? fileName.substring(14) : "application/octet-stream";
            MockMultipartFile mockMultipartFile = new MockMultipartFile(fileName, fileName, contentType, input);
            UploadResult uploadResult = storage.uploadSuffix2(fileBytesByName, getPath(fileName), "multipart/form-data; charset=ISO-8859-1");
            FtpApche.deleteFile(str);
            buildResultEntity(fileName, fileName.substring(14, fileName.length()), "minio", uploadResult, (MultipartFile)mockMultipartFile, password, fileBytesByName);