|
@@ -266,6 +266,11 @@ public class S3FileService extends AbstractFYunFileService {
|
|
|
if (!localFile.getParentFile().exists()) {
|
|
|
localFile.getParentFile().mkdirs();
|
|
|
}
|
|
|
+ if(localFile.isDirectory()){
|
|
|
+ String fileName = remoteFilePath.substring(remoteFilePath.lastIndexOf("/")+1);
|
|
|
+ log.info("未配置文件名,使用默认文件名:{}",fileName);
|
|
|
+ localPath = localPath.concat(File.separator).concat(fileName);
|
|
|
+ }
|
|
|
GetObjectRequest request = new GetObjectRequest(bucket, remoteFilePath);
|
|
|
s3.getObject(request,new File(localPath));
|
|
|
} catch (Throwable throwable) {
|