new release
This commit is contained in:
parent
6e1f171f7b
commit
7dff026db1
4 changed files with 15 additions and 19 deletions
|
@ -9,8 +9,8 @@ android {
|
||||||
applicationId "asgardius.page.s3manager"
|
applicationId "asgardius.page.s3manager"
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 54
|
versionCode 55
|
||||||
versionName "0.5.2"
|
versionName "0.6.0"
|
||||||
setProperty("archivesBaseName", "s3-manager-$versionName")
|
setProperty("archivesBaseName", "s3-manager-$versionName")
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
|
@ -142,6 +142,12 @@ public class Uploader extends AppCompatActivity {
|
||||||
//s3client.createBucket(bucket, location);
|
//s3client.createBucket(bucket, location);
|
||||||
//System.out.println(fkey);
|
//System.out.println(fkey);
|
||||||
if (isfolder) {
|
if (isfolder) {
|
||||||
|
if(prefix.endsWith("/")) {
|
||||||
|
prefix = fprefix.getText().toString();
|
||||||
|
} else {
|
||||||
|
prefix = fprefix.getText().toString().concat("/");
|
||||||
|
}
|
||||||
|
fprefix.setEnabled(false);
|
||||||
document = DocumentFile.fromTreeUri(getApplicationContext(), fileuri);
|
document = DocumentFile.fromTreeUri(getApplicationContext(), fileuri);
|
||||||
DocumentFile[] filelist = document.listFiles();
|
DocumentFile[] filelist = document.listFiles();
|
||||||
ArrayList<String> filepath = new ArrayList<String>();
|
ArrayList<String> filepath = new ArrayList<String>();
|
||||||
|
@ -171,27 +177,16 @@ public class Uploader extends AppCompatActivity {
|
||||||
treelevel++;
|
treelevel++;
|
||||||
fileindex.add(0);
|
fileindex.add(0);
|
||||||
} else {
|
} else {
|
||||||
System.out.println(String.join("/", filepath));
|
ufile = readContentToFile(filelist[fileindex.get(treelevel)].getUri());
|
||||||
|
putS3Object(bucket, prefix+String.join("/", filepath), ufile);
|
||||||
filepath.remove(treelevel);
|
filepath.remove(treelevel);
|
||||||
if(filelist[fileindex.get(treelevel)].length()%MAX_SINGLE_PART_UPLOAD_BYTES == 0) {
|
|
||||||
System.out.println((filelist[fileindex.get(treelevel)].length()/MAX_SINGLE_PART_UPLOAD_BYTES)+" parts");
|
|
||||||
} else {
|
|
||||||
System.out.println(((filelist[fileindex.get(treelevel)].length()/MAX_SINGLE_PART_UPLOAD_BYTES)+1)+" parts");
|
|
||||||
}
|
|
||||||
fileindex.set(treelevel, fileindex.get(treelevel)+1);
|
fileindex.set(treelevel, fileindex.get(treelevel)+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//document = document.getParentFile();
|
|
||||||
//filelist = document.listFiles();
|
|
||||||
//treelevel--;
|
|
||||||
} else {
|
} else {
|
||||||
System.out.println(String.join("/", filepath));
|
ufile = readContentToFile(filelist[i].getUri());
|
||||||
if(filelist[i].length()%MAX_SINGLE_PART_UPLOAD_BYTES == 0) {
|
putS3Object(bucket, prefix+String.join("/", filepath), ufile);
|
||||||
System.out.println((filelist[i].length()/MAX_SINGLE_PART_UPLOAD_BYTES)+" parts");
|
|
||||||
} else {
|
|
||||||
System.out.println(((filelist[i].length()/MAX_SINGLE_PART_UPLOAD_BYTES)+1)+" parts");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
filepath.clear();
|
filepath.clear();
|
||||||
fileindex.clear();
|
fileindex.clear();
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
* UI fixes
|
|
||||||
* Copy file name to clipboard
|
|
3
fastlane/metadata/android/en-US/changelogs/55.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/55.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
* UI fixes
|
||||||
|
* Copy file name to clipboard
|
||||||
|
* Folder upload function added
|
Loading…
Reference in a new issue