How to get local folder contents using JavaScript

I am trying to get local folder contents using JavaScript. I have tried the Filesystem API, but I got error like this:

DOMException: It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources

How can I get images in a local folder and show these images as HTML? Folder structure and images inside a folder are changing dynamically.

Edit: I tried the filesystem here: https://github.com/maciel310/angular-filesystem

Answers:

Answer

FileSystem API is currently being supported only on Chrome and Opera http://caniuse.com/#feat=filesystem

Also you need to obtain permissions from the user to access peristent data.

For more info refer to this article : https://www.html5rocks.com/en/tutorials/file/filesystem/#Reading a directory's contents

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.