Javascript FileAPI: Iterating Directories?

六眼飞鱼酱① 提交于 2019-12-01 11:32:49

Theoretically, what you describe is doable with the FileReader API. For example, this demo reads a .zip file (hit load photos.zip), unpacks its contents, and displays the list of pictures it contains to the user.

For general folder drag and drop, there are two bugs holding Chrome/WebKit back: 1, 2. When those get fixe, you'll be able to drag a folder from the OS onto an <input type="file" webkitdirectory> and traverse all its hierarchy. To see webkitdirectory in action, check out this demo in Chrome.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!