aspose file tools*
The moose likes JSP and the fly likes How do I upload multiple files from a specified folder? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How do I upload multiple files from a specified folder?" Watch "How do I upload multiple files from a specified folder?" New topic
Author

How do I upload multiple files from a specified folder?

Christopher Frankland
Ranch Hand

Joined: Jan 22, 2005
Posts: 42
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

Joined: Jan 10, 2002
Posts: 61661
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Christopher Frankland
Ranch Hand

Joined: Jan 22, 2005
Posts: 42
Thanks Bear. I thought as much. Is there an alternative solution to achieve said functionality? A client based app. would be acceptable.

Cheers.
 
 
subject: How do I upload multiple files from a specified folder?