Wednesday, 29 April 2015

How to upload Image in Amazon s3 with android SDK 2.0

How to upload Image Aman s3 in android SDK 2.0


Try below code
bucket_name='xxxxxx';
key='xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
images3 = new File(uri.getPath())
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentEncoding("UTF-8");
imageSize = inputStream.available();
metadata.setContentLength(imageSize);
TransferManager transferManager = new TransferManager(credentialsProvider);
Upload upload = transferManager.upload(bucket_name, key, images3, metadata);
upload.waitForCompletion();




>