0

I want to make a code using only JavaScript or/and jQuery to access a static directory and retrieve the names of some icons i saved there (SVG icons) and display the names to the user. i couldn't do that with the file api and i have no idea where to start.

1
  • You could make a server side page that scans and lists the contents of the folder.. Then You could use the client side to access it easily Commented Feb 12, 2017 at 13:11

1 Answer 1

2

I'm going to assume from your mention of jQuery and the File API that you're trying to do this within a browser.

You can't. It just isn't allowed, there is no mechanism to provide it.

If you're in control of the machine where you want this information to be accessed, you can run a server process on it that can do that; code in the browser can then make a request to the server code to request the information. But there's no browser-only way to do it.

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.