@@ -77,29 +77,6 @@ public class CloudStorageService {
|
||||
}
|
||||
}
|
||||
|
||||
// public File readFileFromStorageByPath(String filePath) throws IOException {
|
||||
// GetObjectRequest objectRequest = GetObjectRequest.builder()
|
||||
// .bucket(bucket)
|
||||
// .key("files" + filePath)
|
||||
// .build();
|
||||
// AwsCredentials credentials = AwsBasicCredentials.create(key, secretKey);
|
||||
//
|
||||
// S3Client s3Client = S3Client.builder()
|
||||
// .httpClient(ApacheHttpClient.create())
|
||||
// .region(Region.of(region))
|
||||
// .endpointOverride(URI.create(s3endpoint))
|
||||
// .credentialsProvider(StaticCredentialsProvider.create(credentials))
|
||||
// .build();
|
||||
//
|
||||
// String tempDir = System.getProperty("java.io.tmpdir");
|
||||
// String fileName = filePath.replace("/", "_");
|
||||
// File tempFile = new File(tempDir, fileName);
|
||||
//
|
||||
// s3Client.getObject(objectRequest, tempFile.toPath());
|
||||
//
|
||||
// return tempFile;
|
||||
// }
|
||||
|
||||
public File readFileFromStorageByPath(String filePath) throws IOException {
|
||||
GetObjectRequest objectRequest = GetObjectRequest.builder()
|
||||
.bucket(bucket)
|
||||
|
||||
Reference in New Issue
Block a user