简体   繁体   English

如何在wicket中使用MultiFileUploadField进行multiplfe文件选择?

[英]How to use MultiFileUploadField in wicket for multiplfe file selection?

I want to use Multiple file selection in uploading files. 我想在上传文件时使用多个文件选择。 I do not know how could i achieve this. 我不知道怎么能实现这个目标。 I'm using apache wicket 1.4.9 and please suggest me on how to do. 我正在使用apache wicket 1.4.9,请建议我如何做。

Thanks G Samrat 谢谢G Samrat

Multiple file upload is an HTML5 feature. 多文件上传是HTML5功能。 Wicket supports that only in versions 1.5 and up. Wicket仅支持版本1.5及更高版本。 You need to upgrade to do this. 您需要升级才能执行此操作。

In 1.5 you use a regular FileUploadField , which will now give you a List<FileUpload> instead of just a single FileUpload . 在1.5中,您使用常规的FileUploadField ,它现在将为您提供List<FileUpload>而不是单个FileUpload In your markup you put <input type="file" multiple="multiple"/> . 在你的标记中,你<input type="file" multiple="multiple"/> The rest is as usual. 其余的和往常一样。

Besides, 1.4.9 is ancient . 此外,1.4.9是古老的 Even if you decide to stay with 1.4.x you really should upgrade to the latest 1.4.x version at least, for many bugfixes, including some relevant to security. 即使你决定继续使用1.4.x,你至少应该升级到最新的1.4.x版本,对于许多错误修正,包括一些与安全相关的错误修正。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM