Uploading a directory instead of a file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • K Viltersten

    Uploading a directory instead of a file

    If i go as follows:

    <asp:FileUplo ad ID="dirTemp" runat="server" Width="400px" /><br />

    The element i create is requiring me to select a file. Can i use this
    control to point out a directory? Is there another one?

    --
    Konrad Viltersten
  • Marc Gravell

    #2
    Re: Uploading a directory instead of a file

    Not really - as it needs to render at the client via html; there is an
    <input type="file" ...>, but nothing similar for folders. If you are
    happy to use client-side controls (OCX, or possibly silverlight etc) you
    might be able to do more (look at sharepoint's "upload multiple" for
    example) - but otherwise it depends on the user - for example, are they
    savvy enough to zip a folder and upload the zip? It depends on the user:
    a developer is probably fine with this; a visitor to "Ma's bake
    sale.org" - probably not.

    Marc

    Comment

    • K Viltersten

      #3
      SV: Uploading a directory instead of a file

      Not really - as it needs to render at the
      client via html; there is an
      <input type="file" ...>
      but nothing similar for folders. If you
      are happy to use client-side controls
      (OCX, or possibly silverlight etc) you
      might be able to do more...
      Unfortunately i'm not at such liberty. It
      strikes me as awfully strange that such a
      facility hasn't been implemented, though...

      --
      Regards
      Konrad Viltersten
      --------------------------------
      sleep - a substitute for coffee for the poor
      ambition - lack of sense to be lazy

      Comment

      • Lucid

        #4
        Re: Uploading a directory instead of a file

        1: User chooses directory they wish to upload.
        2: Create directory on the server.
        3: Recurse through all the files in the directory on the user-end
        4: For each file, upload.

        This would be in the code-behind of course.


        "K Viltersten" <tmp1@vilterste n.comwrote in message
        news:op.uaqh321 mi74t80@lp028.p agero.local...
        If i go as follows:

        <asp:FileUplo ad ID="dirTemp" runat="server" Width="400px" /><br />

        The element i create is requiring me to select a file. Can i use this
        control to point out a directory? Is there another one?

        --
        Konrad Viltersten

        Comment

        • parez

          #5
          Re: Uploading a directory instead of a file

          On May 6, 3:25 pm, "Lucid" <lu...@phreak20 00.comwrote:
          1: User chooses directory they wish to upload.
          2: Create directory on the server.
          3: Recurse through all the files in the directory on the user-end
          4: For each file, upload.
          >
          This would be in the code-behind of course.
          >
          "K Viltersten" <t...@vilterste n.comwrote in message
          >
          news:op.uaqh321 mi74t80@lp028.p agero.local...
          If i go as follows:
          >
          <asp:FileUplo ad ID="dirTemp" runat="server" Width="400px" /><br />
          >
          The element i create is requiring me to select a file. Can i use this
          control to point out a directory? Is there another one?
          >
          --
          Konrad Viltersten
          Does JS let you "3: Recurse through all the files in the directory on
          the user-end "???

          Comment

          • K Viltersten

            #6
            SV: Uploading a directory instead of a file

            1: User chooses directory they wish to upload.
            2: Create directory on the server.
            3: Recurse through all the files in the
            directory on the user-end
            4: For each file, upload.
            >
            This would be in the code-behind of course.
            Good scheme but how would one do item 1? The
            only way to select the directory i've found
            this far is to type it in into a text box.
            That method will be very error prone...

            --
            Regards
            Konrad Viltersten
            --------------------------------
            sleep - a substitute for coffee for the poor
            ambition - lack of sense to be lazy

            Comment

            • Peter Duniho

              #7
              Re: SV: Uploading a directory instead of a file

              On Tue, 06 May 2008 21:17:32 -0700, K Viltersten <tmp1@vilterste n.com>
              wrote:
              >1: User chooses directory they wish to upload.
              >2: Create directory on the server.
              >3: Recurse through all the files in the directory on the user-end
              >4: For each file, upload.
              > This would be in the code-behind of course.
              >
              Good scheme but how would one do item 1?
              Granted, you're asking an ASP question in a general C# newsgroup, so this
              might not apply to you. But there's the FolderBrowserDi alog class.

              Pete

              Comment

              • K Viltersten

                #8
                Re: SV: Uploading a directory instead of a file

                >>1: User chooses directory they wish to upload.
                >>2: Create directory on the server.
                >>3: Recurse through all the files in the directory on the user-end
                >>4: For each file, upload.
                >> This would be in the code-behind of course.
                >>
                >Good scheme but how would one do item 1?
                >
                Granted, you're asking an ASP question in a general C# newsgroup, so
                this might not apply to you. But there's the FolderBrowserDi alog class.
                Hehe, this is awkward... I _THOUGHT_ it was an ASP.NET group. :)

                It must be the switch of my news client, i geuss... You info was, as you
                very accurately anticipated, not of much use in my case. But that's my
                fault, of course. Sorry for that and thanks!

                Konrad Viltersten

                Comment

                • Peter Duniho

                  #9
                  Re: SV: Uploading a directory instead of a file

                  On Wed, 07 May 2008 00:00:26 -0700, K Viltersten <tmp1@vilterste n.com>
                  wrote:
                  Hehe, this is awkward... I _THOUGHT_ it was an ASP.NET group. :)
                  Not a hard mistake to make, as there are a few ASP.NET experts (well, they
                  seem expert to me anyway :) ) who do answer ASP questions here.

                  But, glad to help redirect you...I hope you get a better answer from the
                  correct newsgroup. :) I would hope that, assuming there's any sort of
                  common file dialog support at all in ASP.NET, they'd include an equivalent
                  to the folder browser dialog.

                  Pete

                  Comment

                  Working...