• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I upload multiple files from a specified folder?

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic