我在这个问题上长时间挣扎。
我已尝试在Chrome浏览器上上传目录,如下所示
1.单击以'浏览...'命名的按钮
2.选择以' a'命名的目录
3.此时,目录层次结构将被忽略。
目录的结构如下
ex)d:/test/a/b/c/1.txt
我希望将目录结构保持为' a / b / c'。
其他人知道决议吗?
<f:form method="post" action="uploadFiles" name="uploadFiles" enctype="multipart/form-data">
Resource Id : <input type="text" name="resourceId" placeholder="ex) test or test_op"/><br/>
<input type="file" name="files" id="files" multiple="" webkitdirectory="" jsonware="true"/>
<f:submit value="submit" />
</f:form>
答案 0 :(得分:0)
我正在努力争取同样的事业。这段代码真的让它发生了,但是有一个错误或者文件/文件夹转移的东西,25个中只有20个被发送,但无论如何它可能对你有帮助。 http://sapphion.com/2012/06/keep-directory-structure-when-uploading/ 如果你想出一些东西,请告诉我,