I'm making a website and i want to see how many projects were submitted by the users and they are all in a folder. There are a lot of questions on the same topic just that they are on node.js. Is there a way to get the files in a way so i can do a foreach loop and get there directories?
1 Answer
The client side cannot crawl the server, for obvious security reasons, unless the server provides such utility, either as end point that lists all its folders, or as a pre-generated folders.json file you can then read from the client.
This is why every other solution mentions Node.js, PHP, Python, or whatever, as unless you create and update such file each time, there's no other way.
folder.jsonfile that contains all folders, pre-generated, or you need an end point that gives you that info. What's in the server, is not crawable from the client, and that's a good thing.