region fix
This commit is contained in:
parent
c30eb36854
commit
19cc86b45e
3 changed files with 10 additions and 4 deletions
|
@ -150,10 +150,11 @@ public class AccountAdd extends AppCompatActivity {
|
|||
public void run() {
|
||||
try {
|
||||
//Your code goes here
|
||||
if (location.equals("")) {
|
||||
location = "us-east-1";
|
||||
}
|
||||
if (endpoint.contains(getResources().getString(R.string.aws_endpoint)) || location.equals("")) {
|
||||
region = Region.getRegion("us-east-1");
|
||||
} else {
|
||||
region = Region.getRegion(location);
|
||||
}
|
||||
S3ClientOptions s3ClientOptions = S3ClientOptions.builder().build();
|
||||
s3ClientOptions.setPathStyleAccess(pathstyle.isChecked());
|
||||
myCredentials = new BasicAWSCredentials(username, password);
|
||||
|
|
|
@ -63,7 +63,11 @@ public class BucketSelect extends AppCompatActivity {
|
|||
isplaylist = getIntent().getBooleanExtra("isplaylist", false);
|
||||
prefix = "";
|
||||
setContentView(R.layout.activity_bucket_select);
|
||||
if (endpoint.contains(getResources().getString(R.string.aws_endpoint))) {
|
||||
region = Region.getRegion("us-east-1");
|
||||
} else {
|
||||
region = Region.getRegion(location);
|
||||
}
|
||||
s3ClientOptions = S3ClientOptions.builder().build();
|
||||
s3ClientOptions.setPathStyleAccess(style);
|
||||
myCredentials = new BasicAWSCredentials(username, password);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<resources>
|
||||
<string name="app_name" translatable="false">S3 Manager</string>
|
||||
<string name="aws_endpoint" translatable="false">.amazonaws.com</string>
|
||||
<string name="endpoint_url" translatable="false">https://s3.asgardius.company</string>
|
||||
<string name="pdf_reader" translatable="false">https://office.asgardius.company/pdfjs</string>
|
||||
<string name="pdf_reader_notready">You need to setup a pdf.js server</string>
|
||||
|
|
Loading…
Reference in a new issue