Reputation: 1069
There are few images stored in a folder with random names.
The contents of the folder will constantly be changing but they will have only images and no other kind of documents.
Therefore i cannot predefine the image names in src.
I want to display the images sequentially (one after another with specific time interval) using HTML-Javascript-CSS codes.
The folder is on the client side only.
Or atleast i should be able to read the filenames in the folder.
I cannot use PHP. How do i do this?
Thank you in advance!
Upvotes: 1
Views: 1437
Reputation: 1500
I think this is not trivially possible for security reasons. No webpage (even locally) is allowed to simply read your folder content. There have been some workarounds for some browsers, but I don't think there is a true Cross-Browser solution.
That said, there is the HTML5 file API that allows the user to select the images or drag and drop them to a local website.
Another option would be to have a small executable file that creates for instance a json List of your files and have the website read the filenames from there.
After you have the filenames, use any HTML/JS/CSS gallery.
Upvotes: 2