Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/main/java/gov/nasa/podaac/forge/FootprintHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,10 @@ public String download(String bucket, String key, String outputFileAbsolutePath)

File file = new File(outputFileAbsolutePath);
if (!StringUtils.isBlank(bucket) && !StringUtils.isBlank(key)) {
s3Client.getObject(new GetObjectRequest(
bucket, key), file);
GetObjectRequest getObjectRequest = new GetObjectRequest(bucket, key);
// Enable Requester Pays for S3 downloads
getObjectRequest.withRequesterPays(true);
s3Client.getObject(getObjectRequest, file);
return file.getAbsolutePath();
} else {
return "";
Expand All @@ -437,7 +439,10 @@ public String upload(String bucket, String key, File file) {
String path = bucket + "/" + key;
try {
AdapterLogger.LogInfo(this.className + " Uploading an object: " + path);
s3Client.putObject(new PutObjectRequest(bucket, key, file));
PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, key, file);
// Enable Requester Pays for S3 uploads
putObjectRequest.withRequesterPays(true);
s3Client.putObject(putObjectRequest);
AdapterLogger.LogInfo(this.className + " Finished uploading an object: " + path);
} catch (AmazonServiceException ase) {
AdapterLogger.LogError(this.className + " Caught an AmazonServiceException, which " +
Expand Down
Loading