Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I upload multiple files from a specified folder?

 
Christopher Frankland
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Users can currently upload a single file within my JSP by browsing to the specified file. Works without any problems. However, a recent requirement now requires the user to be able to select a folder and have all images/files within that folder uploaded.

How can I provide this functionality within my JSP and servlet?

Advice much appreciated.

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64973
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. At least not with standard browser upload controls. HTML does not provide for anything but one file per <input type="file"> control. You can put more than one file control on a page (or even allow them to create new ones on the fly via JavaScript), but you cannot choose a folder and upload all files within it.
 
Christopher Frankland
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear. I thought as much. Is there an alternative solution to achieve said functionality? A client based app. would be acceptable.

Cheers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic