-1

Do we have any functionality available in Apache Wicket for file uploads, where i can have different properties like file object,content Type,file name readily available.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • Your question is very unclear to anyone unfamiliar with Struts 2. Maybe you could explain what you're looking for... – Nicktar Oct 14 '12 at 17:02
  • i was specifically looking for File interceptor like functionality thing in wicket,basically i wanted to know if 1) I could configure different properties like size in some config file. 2) I can directly access file properties as mentioned in example without writing any extra code. – Mangesh Jogade Oct 15 '12 at 14:05

1 Answers1

3

Just use a FileUploadField, mark the form as multiplePart and when the form is submitted you can access the FileUpload which has properties getSize(), getContentType() and getClientFileName().

More info & example: http://wicket.apache.org/apidocs/1.5/org/apache/wicket/markup/html/form/upload/FileUpload.html

http://www.mkyong.com/wicket/wicket-file-upload-example/

Stijn Geukens
  • 15,454
  • 8
  • 66
  • 101