From df87904f33b7a2d678e5ff47539a167aca5a8aad Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 04 十一月 2024 23:39:51 +0800
Subject: [PATCH] 钉钉登录bug修改
---
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java | 15 +++++----------
1 files changed, 5 insertions(+), 10 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 17bbfed..1a7b35d 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
@@ -60,16 +60,11 @@
InputStream input = FtpApche.downloadFileFromDailyDir(str);
byte[] fileBytesByName = FtpApche.getFileBytesByName(input);
OssClient storage = OssFactory.instance();
- MultipartFile file = new MockMultipartFile(fileName,fileName, fileName.substring(14,fileName.length()), input);
-// UploadResult uploadResult = storage.upload(input,getPath(fileName),"multipart/form-data; charset=ISO-8859-1");
- UploadResult uploadResult;
-// try {
- uploadResult = storage.uploadSuffix2(fileBytesByName, getPath(fileName), "multipart/form-data; charset=ISO-8859-1");
-
+ UploadResult uploadResult = storage.upload(input,getPath(fileName),fileName.substring(14,fileName.length()));
FtpApche.deleteFile(str);
- input.close();
-// buildResultEntity(fileName, fileName.substring(14,fileName.length()), "minio", uploadResult, file,
-// password, fileBytesByName);
+ MultipartFile file = new MockMultipartFile(fileName,fileName, fileName.substring(14,fileName.length()), input);
+ buildResultEntity(fileName, fileName.substring(14,fileName.length()), "minio", uploadResult, file,
+ password, fileBytesByName);
}
@@ -104,7 +99,7 @@
private String post(SynchronousRequest request, byte[] bytes) throws IOException {
HashMap<String, String> headers = new HashMap<>(3);
- String requestUrl = boundary.getVideo() + "/resource/synchronization/upload";
+ String requestUrl = boundary.getLocalhost() + "/resource/synchronization/upload";
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
headers.put("content-type", "application/json");
--
Gitblit v1.8.0