elimina método no usado
This commit is contained in:
parent
d1a4e8c6e2
commit
35cba37651
@ -285,27 +285,4 @@ public class ClasePrincipal {
|
||||
return urlObjetoS3;
|
||||
}
|
||||
|
||||
private void almacenarDocumentacionoEnS3(String claveDocumento, File ficheroDocumentoS3) {
|
||||
// Crear el cliente de S3 (usando SDK v2)
|
||||
S3Client clienteS3 = GestorClientesServiciosAWS.getClienteBucketS3();
|
||||
|
||||
// Solicitud para subir el archivo
|
||||
PutObjectRequest putObjectRequest = PutObjectRequest.builder().bucket(NOMBRE_BUCKET).key(claveDocumento)
|
||||
.build();
|
||||
|
||||
try {
|
||||
// Realizar la carga del archivo
|
||||
PutObjectResponse response = clienteS3.putObject(putObjectRequest, ficheroDocumentoS3.toPath());
|
||||
|
||||
// Imprimir respuesta de éxito
|
||||
System.out.println("Archivo subido correctamente. ETag: " + response.eTag());
|
||||
} catch (S3Exception e) {
|
||||
System.err.println("No se pudo insertar el ítem: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
clienteS3.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user