0

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?

2
  • from the client? nope, but you can publish a folder.json file 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. Commented Jul 17, 2020 at 11:02
  • Ok sure i will try that. Can you submit it as an answer? Commented Jul 17, 2020 at 11:05

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.