diff --git a/app/build.gradle b/app/build.gradle
index 01fb8a6..b125131 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3manager"
minSdk 24
targetSdk 32
- versionCode 6
- versionName "0.1.4"
+ versionCode 7
+ versionName "0.1.5"
setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
diff --git a/app/src/main/java/asgardius/page/s3manager/BucketSelect.java b/app/src/main/java/asgardius/page/s3manager/BucketSelect.java
index 6e940db..02a5608 100644
--- a/app/src/main/java/asgardius/page/s3manager/BucketSelect.java
+++ b/app/src/main/java/asgardius/page/s3manager/BucketSelect.java
@@ -156,8 +156,8 @@ public class BucketSelect extends AppCompatActivity {
// Toast message on menu item clicked
//Toast.makeText(MainActivity.this, "You Clicked " + menuItem.getTitle(), Toast.LENGTH_SHORT).show();
if (menuItem.getTitle() == getResources().getString(R.string.upload_file_tobucket)) {
- //Toast.makeText(BucketSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
- upload(Name.get(position).toString(), false);
+ Toast.makeText(BucketSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
+ //upload(Name.get(position).toString(), false);
} else if (menuItem.getTitle() == getResources().getString(R.string.create_bucket)) {
//upload();
@@ -231,8 +231,10 @@ public class BucketSelect extends AppCompatActivity {
}
//System.out.println(object);
- DeleteObjectsRequest deleteObjectsRequest = new DeleteObjectsRequest(bucket).withKeys(objectl.toArray(new String[0]));
- s3client.deleteObjects(deleteObjectsRequest);
+ if (objectl.size() >= 1) {
+ DeleteObjectsRequest deleteObjectsRequest = new DeleteObjectsRequest(bucket).withKeys(objectl.toArray(new String[0]));
+ s3client.deleteObjects(deleteObjectsRequest);
+ }
s3client.deleteBucket(bucket);
runOnUiThread(new Runnable() {
diff --git a/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java b/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java
index 4b26abe..bc68bf5 100644
--- a/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java
+++ b/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java
@@ -258,8 +258,8 @@ public class ObjectSelect extends AppCompatActivity {
// Toast message on menu item clicked
//Toast.makeText(MainActivity.this, "You Clicked " + menuItem.getTitle(), Toast.LENGTH_SHORT).show();
if (menuItem.getTitle() == getResources().getString(R.string.upload_file_here)) {
- //Toast.makeText(ObjectSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
- upload(false);
+ Toast.makeText(ObjectSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
+ //upload(false);
} else if (menuItem.getTitle() == getResources().getString(R.string.file_del)) {
if (Name.size() == 1 && treelevel >= 1) {
Toast.makeText(ObjectSelect.this, getResources().getString(R.string.only_item_onlist), Toast.LENGTH_SHORT).show();
@@ -284,8 +284,8 @@ public class ObjectSelect extends AppCompatActivity {
// Toast message on menu item clicked
//Toast.makeText(MainActivity.this, "You Clicked " + menuItem.getTitle(), Toast.LENGTH_SHORT).show();
if (menuItem.getTitle() == getResources().getString(R.string.upload_file_here)) {
- //Toast.makeText(ObjectSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
- upload(false);
+ Toast.makeText(ObjectSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
+ //upload(false);
} else if (menuItem.getTitle() == getResources().getString(R.string.file_external)) {
try {
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
diff --git a/app/src/main/java/asgardius/page/s3manager/Uploader.java b/app/src/main/java/asgardius/page/s3manager/Uploader.java
index c28e639..5786c44 100644
--- a/app/src/main/java/asgardius/page/s3manager/Uploader.java
+++ b/app/src/main/java/asgardius/page/s3manager/Uploader.java
@@ -60,7 +60,7 @@ public class Uploader extends AppCompatActivity {
simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar);
//Toast.makeText(Uploader.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
performFileSearch("Select file to upload");
- //fprefix.setText(prefix);
+ fprefix.setText(prefix);
/*if (isfolder) {
folder = uploadFolder();
} else {
@@ -75,7 +75,7 @@ public class Uploader extends AppCompatActivity {
} else {
//Toast.makeText(CreateBucket.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
//System.out.println(file.getPath());
- System.out.println(filename[filename.length-1]);
+ System.out.println(fprefix.getText().toString()+filename[filename.length-1]);
Thread uploadFile = new Thread(new Runnable() {
@Override
diff --git a/app/src/main/res/layout/activity_create_bucket.xml b/app/src/main/res/layout/activity_create_bucket.xml
index 1bd9e66..6152397 100644
--- a/app/src/main/res/layout/activity_create_bucket.xml
+++ b/app/src/main/res/layout/activity_create_bucket.xml
@@ -15,7 +15,7 @@
android:textSize="30sp" />