In this post we will see how we can use the Amazon AWS S3 to store objects. We will be using the JetS3t library to process our objects. JetS3t library also known as Jet Set, is widely used for processing the AWS S3 i.e. Amazon Web Services, Simple Storage Service.
Before working on AWS S3, you need to have a valid account on AWS with S3 key and S3 password. You can register here free of cost.
Here we will using 4 API of jets3t i.e.
- Upload a document
- Download a document
- Listing of documents
- Delete a document
We will upload images of user on S3 and then process them as specified above.
- Upload: to upload image to the S3 we will be using putObject() method of the S3Service class.
- Download: To download image we will be using getObject() method of S3Service class.
- List: To list images we will be using listObjects() method of S3Service class.
- Delete: To delete image we will be using deleteObjects() method of S3Service class. We can also delete multiple images using deleteMultipleObjects() method.
Full example is available on the GitHub. Simply download and explore it.
Comments
Post a Comment