Skip to content

Commit

Permalink
Change to return of getBucketLocation and binder mappings in the Modu…
Browse files Browse the repository at this point in the history
…leConfig.
  • Loading branch information
dcardOrtus committed Sep 20, 2023
1 parent bdcfcd3 commit 49a12f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions ModuleConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ component {
name = "urlStyle",
value = variables.settings.urlStyle
);
binder.map( "Sv4Util@s3sdk" ).to( "#moduleMapping#.models.AmazonS3" );
//This change might be based on ignorance but it didn't look correct.
//binder.map( "Sv4Util@s3sdk" ).to( "#moduleMapping#.models.AmazonS3" );
binder.map( "Sv4Util@s3sdk" ).to( "#moduleMapping#.models.Sv4Util" );

binder.map( "Sv2Util@s3sdk" ).to( "#moduleMapping#.models.AmazonS3" );
//binder.map( "Sv2Util@s3sdk" ).to( "#moduleMapping#.models.AmazonS3" );
binder.map( "Sv2Util@s3sdk" ).to( "#moduleMapping#.models.Sv2Util" );
}


Expand Down
8 changes: 4 additions & 4 deletions models/AmazonS3.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ component accessors="true" singleton {
if ( results.error ) {
throw( message = "Error making Amazon REST Call", detail = results.message );
}

if ( len( results.response.LocationConstraint.XMLText ) ) {
//Should this return whatever comes from AWS? It seems like hardcoding a potentially wrong answer is not a good idea.
//if ( len( results.response.LocationConstraint.XMLText ) ) {
return results.response.LocationConstraint.XMLText;
}
//}

return "US";
//return "US";
}

/**
Expand Down

0 comments on commit 49a12f6

Please sign in to comment.