new release

This commit is contained in:
Page Asgardius 2022-09-11 13:13:49 -07:00
parent 1e77a76065
commit a9ea4337c1
3 changed files with 34 additions and 14 deletions

View File

@ -10,6 +10,10 @@ Current feature list
* Webpage viewer (htm, html)
* Multiple account support
* Open object in external web browser
* Create buckets
* Delete buckets
* Delete files
* Delete folders
Known supported providers

View File

@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3manager"
minSdk 24
targetSdk 32
versionCode 5
versionName "0.1.3"
versionCode 6
versionName "0.1.4"
setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@ -210,24 +210,40 @@ public class ObjectSelect extends AppCompatActivity {
explorer(Name.get(position).toString());
} else if (Img.get(position).equals(R.drawable.imagefile)) {
//load media file
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
imageviewer(objectURL.toString());
try {
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
imageviewer(objectURL.toString());
} catch (Exception e) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
}
} else if (Img.get(position).equals(R.drawable.textfile)) {
//load media file
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
textviewer(objectURL.toString());
try {
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
textviewer(objectURL.toString());
} catch (Exception e) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
}
} else if (Img.get(position).equals(R.drawable.webpage)) {
//load media file
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
webbrowser(objectURL.toString());
try {
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
webbrowser(objectURL.toString());
} catch (Exception e) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
}
} else if (Img.get(position).equals(R.drawable.audiofile) || Img.get(position).equals(R.drawable.videofile)) {
//load media file
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
videoplayer(objectURL.toString());
try {
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
videoplayer(objectURL.toString());
} catch (Exception e) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ObjectSelect.this, getResources().getString(R.string.unsupported_file), Toast.LENGTH_SHORT).show();
}