Results 1 to 8 of 8

Thread: [urgent] how to access client's local files?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2004
    Posts
    362

    Exclamation [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

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [urgent] how to access client's local files?

    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: [urgent] how to access client's local files?

    Quote Originally Posted by FlyingBear View Post
    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.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [urgent] how to access client's local files?

    Moved To ASP.NET

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  7. #7
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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
  •  



Click Here to Expand Forum to Full Width