Browse Source

解决模型导出bug尝试

dev-lhz
chenzhihang 1 year ago
parent
commit
09302706d5
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/MinioUtil.java

+ 3
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/MinioUtil.java View File

@@ -288,7 +288,9 @@ public class MinioUtil {
GetObjectArgs getObjectArgs = GetObjectArgs.builder().bucket(bucketName).object(URLDecoder.decode(item.objectName())).build(); GetObjectArgs getObjectArgs = GetObjectArgs.builder().bucket(bucketName).object(URLDecoder.decode(item.objectName())).build();
String objectName = URLDecoder.decode(item.objectName(), "UTF-8"); String objectName = URLDecoder.decode(item.objectName(), "UTF-8");
// Create a local file with the same name as the object // Create a local file with the same name as the object
File file = new File(targetPath);
Path fileName = Paths.get(objectName).getFileName();
String targetFile = targetPath + "/" + fileName.toString();
File file = new File(targetFile);
// Create parent directories if needed // Create parent directories if needed
file.getParentFile().mkdirs(); file.getParentFile().mkdirs();
// Get the object as an input stream // Get the object as an input stream


Loading…
Cancel
Save