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