如何使用React创建Select Directory? [英] How to make Select Directory using React?
本文介绍了如何使用React创建Select Directory?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将所有文件从文件夹上传到服务器.我正在尝试实现选择目录"窗口,而不是选择文件".
I need to upload all files from a folder to server. I'm trying to implement Select Directory window, and not Select file.
正常方式如下:
<input type="file" webkitdirectory directory/>
对我不起作用,并显示了选择文件"窗口.
Did not work for me, and showed Select File window.
但是,当我使用此输入标签创建空的常规html文件时,它工作正常.有人知道如何使用React实施解决方案吗?
But when I created empty regular html file with this input tag, it was working fine. Does anybody know how to implement the solution using React?
谢谢!
推荐答案
尝试 bheptinh.
<input directory="" webkitdirectory="" type="file" />
这篇关于如何使用React创建Select Directory?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文