0

I need to display my images from s3 (amazon) to html web page. I have images in my s3 storge and I want to retrive them to my html page with html code or node js. I don't know the names of the images beacuse I'm trying to build an app the clients can upload and delete images but I still whant to sidplay the current images that are stored in the bucket.

How can I do that?

thanks,

adi
  • 191
  • 2
  • 14
  • Possible duplicate of [getting all filenames in a directory with node.js](http://stackoverflow.com/questions/2727167/getting-all-filenames-in-a-directory-with-node-js) – Itay Gal May 22 '16 at 14:38

1 Answers1

1

Get your storage address and use this HTML code to present the image:

<html>
    <head>
        <title>Example</title>
    </head>
    <body>
        <img src="your_storage_address/image_folder/image_name.image_extension" />
    </body>
</html>
Itay Gal
  • 10,706
  • 6
  • 36
  • 75
  • Thanks for your answer. I want to display images that I don't know that was uploaded (I'm creating a web app that can upload and delete photos to and from s3) but I want the user to see which photos are now in the buket ie I dont know the path of the image – adi May 22 '16 at 14:34
  • see these answers http://stackoverflow.com/questions/2727167/getting-all-filenames-in-a-directory-with-node-js – Itay Gal May 22 '16 at 14:36
  • 1
    @adi: rather than leaving comments on answers to more clearly explain your problem please try to edit your question to fully, and clearly, explain your problem. That way those willing, and wanting, to help you aren't expected to read every comment to every answer just in case there's another detail you left out. Incidentally, take a read of the [ask] and [mcve] guidelines to learn how to ask 'better' questions. – David Thomas May 22 '16 at 14:38
  • @ItayGal but it don't wan't to filename I want to see the photos in HTML – adi May 22 '16 at 14:59
  • for each file name add an `img` tag and replace the `src`value with the correct file name. – Itay Gal May 22 '16 at 15:00
  • @ItayGal the function of getting the filename is in a file that is javascript and I want to display the images in an ejs file – adi May 22 '16 at 15:09