This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 60804
    
  65

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.
 
Don't get me started about those stupid light bulbs.
 
subject: How do I upload multiple files from a specified folder?
 
Similar Threads
File uploading in jarred application -- URGENT!
File uploading in EAR
File uploading in EAR
uploading a file but want to restrict the type of files
File validation after File Upload