Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am aware of the FileUpload Control that allows you to upload one file at a time and the input(File) html control that allows you to upload multiple files selected in a folder. My question is: Is it possible to select a folder (that has subfolders with files in each subfolder) and upload the whole folder directly? If not, is it possible to get the location of one of the files in one subfolder and uploading the remaining as well? (the tree structure in the subfolders remains the same). I am trying to do the second option, but am not able to reach to a possible solution as of yet.
Posted

1 solution

No, you can't do that, one possible solution is to compress your folder as zip and upload it to server then from server you can extract zip file.
 
Share this answer
 
Comments
Mobile.Instinct 18-Jul-13 6:01am    
What about the second option? Even that is not possible?
Mobile.Instinct 24-Jul-13 6:54am    
ok will try that. Thanks.
Nasir M@hmood 18-Jul-13 6:29am    
Yes this is possible by looping, and in this case you have to do some work on server side, you have to pass folder structure along with form and on server side when form submitted save file as folder structure.
Mobile.Instinct 19-Jul-13 4:31am    
Ok in regards to your solution, is there a decompression function that I could use that would uncompress the zipped file and then display it like a file explorer on my web page?
Nasir M@hmood 20-Jul-13 0:05am    
you can use sharpziplib for this purpose for more detail you can visit http://www.icsharpcode.net/opensource/sharpziplib/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900