|
-
Jun 24th, 2010, 04:07 PM
#1
Thread Starter
Hyperactive Member
[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
-
Jun 25th, 2010, 05:21 AM
#2
Re: [urgent] how to access client's local files?
-
Jun 25th, 2010, 05:37 AM
#3
Re: [urgent] how to access client's local files?
 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.
-
Jun 25th, 2010, 05:45 AM
#4
Re: [urgent] how to access client's local files?
-
Jun 25th, 2010, 06:19 AM
#5
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
-
Jun 25th, 2010, 06:20 AM
#6
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
-
Jun 25th, 2010, 08:19 AM
#7
Frenzied Member
Re: [urgent] how to access client's local files?
hay,
i don't believe that you can select folder,
fileupload control
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 26th, 2010, 04:14 AM
#8
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|