I know we can upload a single file given the file to browser using input tag and file.
But how can we upload files from a directory given the directory path in a Web Application?
I know we can upload a single file given the file to browser using input tag and file.
But how can we upload files from a directory given the directory path in a Web Application?
As of now if you want only HTML solution, you can use directory upload in chrome and firefox only:
How do I use Google Chrome 11's Upload Folder feature in my own code?
If you're willing to use Flash or other sort of plugins, see this thread:
In order to do that you would need a javacript client library to be able to iterate over the directory and upload them one by one, however the problem is that security prevents code from just uploading files arbitrarily without the user selecting them.
Whilst it's possible to get a file list from a directory you can't upload the files without the user giving authorisation otherwise there would be huge security implications.
The only way to do it would be to have the user install something locally e.g. an ActiveX control that does the uploads with the installation being the authorisation, but it would require you to find or develop the control, have them install it and even then cross browser compatibility would be an issue.