@ -57,6 +57,8 @@ public class S3ResourceRepository extends BaseResourceRepository {
public static final String HTTP = "http:" ;
public static final String HTTP = "http:" ;
private final boolean preserveMetadata ;
private final AmazonS3 s3 ;
private final AmazonS3 s3 ;
private final String bucket ;
private final String bucket ;
@ -83,6 +85,7 @@ public class S3ResourceRepository extends BaseResourceRepository {
amazonS3ClientBuilder = amazonS3ClientBuilder . withClientConfiguration ( clientConfiguration ) ;
amazonS3ClientBuilder = amazonS3ClientBuilder . withClientConfiguration ( clientConfiguration ) ;
this . s3 = amazonS3ClientBuilder . build ( ) ;
this . s3 = amazonS3ClientBuilder . build ( ) ;
this . bucket = config . getBucket ( ) ;
this . bucket = config . getBucket ( ) ;
this . preserveMetadata = config . isPreserveMetadata ( ) ;
}
}
@Override
@Override
@ -271,7 +274,7 @@ public class S3ResourceRepository extends BaseResourceRepository {
try {
try {
s3 . putObject ( req ) ;
s3 . putObject ( req ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
LogKit . error ( "[S3] Failed to create parent pa th {}" , path ) ;
LogKit . error ( "[S3] Failed to create path {}" , path ) ;
return false ;
return false ;
}
}
return true ;
return true ;