DEV Community

Cover image for Get all the images from a folder in HTML with paginated view
saharajdeep
saharajdeep

Posted on

Get all the images from a folder in HTML with paginated view

I have a folder named uploads. An admin uploads a picture in this folder and a user must see all the images with paginated view.

I have read the file using in express but I cannot add it in the HTML.I want to add the images dynamically in HTML. So every time the admin adds a new picture the user must see those images along with the previous ones.

The folder name is uploads and the HTML page is located under views/usernews/addNews.

Top comments (1)

Collapse
 
laurencejjones profile image
Laurence Jones • Edited

Any sort of codebase we can look at to see the current set up?

You could use websockets to detect whether the length of local store images / downloaded images is shorter than image length on server if so go fetch new ones.