I
I
Ivan Shashkov2021-09-24 18:53:14
Frontend
Ivan Shashkov, 2021-09-24 18:53:14

How to get a list of files in a folder and write them to JSON using js?

The project has a folder with images. Is it possible to crawl this folder on page load and fit the names of all the images into a JSON file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zombtron, 2021-09-24
@Xaski

Without the help of server technologies, purely at the front, it is impossible.
If the project is yours, read the folder on the server and give it to the client. If not yours, and the owner hid the contents, then that's it ... You can really indirectly - look from where what is being loaded, analyze names, check what exists. But you can't get everything...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question