This commit is contained in:
@@ -65,10 +65,22 @@ 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(Files.readAllBytes(Paths.get(sendToCloudFilePath))));
|
||||
RequestBody.fromBytes(bytes));
|
||||
Files.deleteIfExists(Paths.get(sendToCloudFilePath));
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to read file: {}", filePath, e);
|
||||
|
||||
Reference in New Issue
Block a user