通过HTML表单上传整个目录 [英] Upload a whole directory through an HTML form
本文介绍了通过HTML表单上传整个目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在浏览器中上传带有输入文件的文件夹?
Is it possible to upload a folder with a file input in the browser?
我搜索并发现这可能是浏览器的限制,我可能需要使用Java Applet或Flash。
I searched and found out that this might be a browser limitation and that I might need to use a Java Applet or Flash.
推荐答案
使用webkit目录已成为可能。
It's becoming possible with use of webkitdirectory.
<input type="file" webkitdirectory directory multiple />
自Firefox 50,Chrome 30,Safari 11.1,Edge 14开始受支持,但大多数移动浏览器均不支持自2019年以来: https://caniuse.com/#feat=input-file-directory
Supported since Firefox 50, Chrome 30, Safari 11.1, Edge 14, but not on most mobile browsers as of 2019: https://caniuse.com/#feat=input-file-directory
这篇关于通过HTML表单上传整个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文