[urgent] how to access client's local files?
I'm sorry to post it to here. it should be in asp.net. but, it is urgent and important, wish someone here know the answer.
what I need do for an asp.net page is:
1) client select a file, or;
2) client select a folder;
Get file (or files in the folder)'s properties, something like name, ext, etc. and save to db.
it will be easy if it is a desktop app. however, in asp.net, how can I do that? do I have to upload all files to server first? is there a way to do this for all files in a folder? any third party control?
thanks, appreciate the help.
bear
Re: [urgent] how to access client's local files?
Re: [urgent] how to access client's local files?
Quote:
Originally Posted by
FlyingBear
I'm sorry to post it to here. it should be in asp.net. but, it is urgent and important, wish someone here know the answer.
what I need do for an asp.net page is:
1) client select a file, or;
2) client select a folder;
Get file (or files in the folder)'s properties, something like name, ext, etc. and save to db.
it will be easy if it is a desktop app. however, in asp.net, how can I do that? do I have to upload all files to server first? is there a way to do this for all files in a folder? any third party control?
thanks, appreciate the help.
bear
1. Use the FileUpload control.
2. You can select only one file to upload at a time. Folders can't be selected for upload.
3. The workaround for uploading an entire folder is - ask the client to zip the folder, then upload that file. On the server, you can unzip it back into a folder etc.
Re: [urgent] how to access client's local files?
Re: [urgent] how to access client's local files?
I have to ask, why not post directly in the ASP.Net Forum, if you knew that is where your question should go.
There are various 3rd party controls, like these:
http://swfupload.org/
http://silverlightfileupld.codeplex.com/
That would allow you to upload multiple files at once, but none that I am aware of, do entire folders.
Gary
Re: [urgent] how to access client's local files?
If you go down the route of uploading a zip file, you could add logic to your server side code to automatically extract that zip file, using something like this:
http://www.icsharpcode.net/OpenSource/SharpZipLib/
Gary
Re: [urgent] how to access client's local files?
hay,
i don't believe that you can select folder,
fileupload control
Re: [urgent] how to access client's local files?
FlyingBear,
Have you been able to try any of the suggestions in this thread? Were you able to work around your problem?
Gary