|
|
|
@@ -288,7 +288,9 @@ public class MinioUtil { |
|
|
|
GetObjectArgs getObjectArgs = GetObjectArgs.builder().bucket(bucketName).object(URLDecoder.decode(item.objectName())).build(); |
|
|
|
String objectName = URLDecoder.decode(item.objectName(), "UTF-8"); |
|
|
|
// 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 |
|
|
|
file.getParentFile().mkdirs(); |
|
|
|
// Get the object as an input stream |
|
|
|
|