This commit is contained in:
@@ -68,20 +68,8 @@ public class CloudStorageService {
|
||||
.key(filePath)
|
||||
.contentType(contentType)
|
||||
.build();
|
||||
log.info("putObjectRequest: " + putObjectRequest);
|
||||
try {
|
||||
log.info("sendToCloudFilePath: " + sendToCloudFilePath);
|
||||
log.info("sendToCloudFilePath: " + sendToCloudFilePath);
|
||||
log.info("sendToCloudFilePath: " + sendToCloudFilePath);
|
||||
log.info("sendToCloudFilePath: " + sendToCloudFilePath);
|
||||
log.info("sendToCloudFilePath: " + sendToCloudFilePath);
|
||||
byte[] bytes = Files.readAllBytes(Paths.get(sendToCloudFilePath));
|
||||
|
||||
log.info("bytes: " + bytes.length);
|
||||
log.info("bytes: " + bytes.length);
|
||||
log.info("bytes: " + bytes.length);
|
||||
log.info("bytes: " + bytes.length);
|
||||
log.info("bytes: " + bytes.length);
|
||||
s3Client.putObject(putObjectRequest,
|
||||
RequestBody.fromBytes(bytes));
|
||||
Files.deleteIfExists(Paths.get(sendToCloudFilePath));
|
||||
@@ -89,7 +77,7 @@ public class CloudStorageService {
|
||||
log.error("Failed to read file: {}", filePath, e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
// public File readFileFromStorageByPath(String filePath) throws IOException {
|
||||
// GetObjectRequest objectRequest = GetObjectRequest.builder()
|
||||
// .bucket(bucket)
|
||||
|
||||
Reference in New Issue
Block a user