Samrat
Samrat

Reputation: 367

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.

Thanks G Samrat

Upvotes: 0

Views: 1424

Answers (1)

Carl-Eric Menzel
Carl-Eric Menzel

Reputation: 1266

Multiple file upload is an HTML5 feature. Wicket supports that only in versions 1.5 and up. 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. In your markup you put <input type="file" multiple="multiple"/>. The rest is as usual.

Besides, 1.4.9 is ancient. 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.

Upvotes: 2

Related Questions