How to display images from AWS S3 without downloading in the local storage

3.3k views Asked by At

My android app shows images which is downloaded from AWS S3. For now I download the images to the local storage, and show images from the downloaded images. But, it would be annoying from the user's perspective.

How can I display image from AWS S3 without downloading into the local storage. It would be great if I can display images not with the file but with image url.

It might be possible by set the files on ASW S3 to public, which I want to avoid for security issues.

1

There are 1 answers

0
Vikasdeep Singh On BEST ANSWER

Firstly generate pre-signed AWS S3 URL and then load image using Glide. Below are steps:

  1. How to generate pre-signed AWS S3 bucket URL check here

  2. Load image using Glide:

    Glide.with(getActivity().getBaseContext()).load("IMAGE URL FROM S3").centerCrop().into(imageView);