So far I've been able to get only the file names from the browse button by using just jQuery and HTML file form. Here is my fiddle: http://jsfiddle.net/p42Wv/2/
MY ATTEMPT
$("#file").bind("change", function() {
var elem = document.getElementById("file");
var names = [];
for (var i = 0; i < elem.files.length; ++ i) {
names.push(elem.files[i].name);
}
var names2 = names.join('\n');
$("#filename").val( names2 );
});
I get the file names as I'm supposed to BUT how do i get the Folder Names as well as the file names when I select a mixed list of files and folders in the "Browse" button?
EDIT:
NOTE: I'm looking for Folder Name and NOT the Folder Path. I've seen website such as Google Drive that lets user's select a WHOLE folder to upload. Isn't the mere extraction of folder names such an issue? If not, how does Google Drive for instance, access the subfiles of a folder and upload?
Thanks a lot, John