From 8b3313c5b26855355b40067eeb3678fd3476baf1 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 18 二月 2025 10:38:58 +0800
Subject: [PATCH] 同步摆渡文件先登录

---
 ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java
index 00a24a4..bf55b2a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java
+++ b/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);

--
Gitblit v1.8.0