Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to Upload Directory

How to Upload Directory

Scheduled Pinned Locked Moved ASP.NET
sysadmintutorialquestion
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Samarjeet Singh india
    wrote on last edited by
    #1

    Hi, I want to upload the directory on the server. The file upload control is uploading the file not directory. is there a way by which I can upload the directory ? Thanks

    J Z M N 5 Replies Last reply
    0
    • S Samarjeet Singh india

      Hi, I want to upload the directory on the server. The file upload control is uploading the file not directory. is there a way by which I can upload the directory ? Thanks

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      That's why it's called file upload, it uploads 1 file. Uploadify will upload multiple files at the same time sort of. Here's some seeds to get started with, just food for thought for planning. I've never written one so I don't have any experience at it. Using HTML5 to do mass uploads http://stackoverflow.com/questions/3590058/does-html5-allow-drag-drop-upload-of-folders-or-a-folder-tree[^] http://dior.ics.muni.cz/~makub/massupload.html[^]

      1 Reply Last reply
      0
      • S Samarjeet Singh india

        Hi, I want to upload the directory on the server. The file upload control is uploading the file not directory. is there a way by which I can upload the directory ? Thanks

        Z Offline
        Z Offline
        ZurdoDev
        wrote on last edited by
        #3

        I have a dumb question. Are you wanting to upload all the files in the directory or somehow upload just the directory?

        There are only 10 types of people in the world, those who understand binary and those who don't.

        Kornfeld Eliyahu PeterK 1 Reply Last reply
        0
        • Z ZurdoDev

          I have a dumb question. Are you wanting to upload all the files in the directory or somehow upload just the directory?

          There are only 10 types of people in the world, those who understand binary and those who don't.

          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu Peter
          wrote on last edited by
          #4

          I think dumb question should be asked in QA :laugh:

          I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

          "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

          Z 1 Reply Last reply
          0
          • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

            I think dumb question should be asked in QA :laugh:

            I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

            Z Offline
            Z Offline
            ZurdoDev
            wrote on last edited by
            #5

            True. That is the place for it. :) Heck, I could copy my question and paste into a new question in QA without any of the context here and it would still make more sense than most questions that come through there. :omg:

            There are only 10 types of people in the world, those who understand binary and those who don't.

            1 Reply Last reply
            0
            • S Samarjeet Singh india

              Hi, I want to upload the directory on the server. The file upload control is uploading the file not directory. is there a way by which I can upload the directory ? Thanks

              M Offline
              M Offline
              meeram39
              wrote on last edited by
              #6

              Why do you want to upload a directory instead of file? What is its significance??? If you want to upload the directory itself, it can be done using jQuery plugins. See this link

              1 Reply Last reply
              0
              • S Samarjeet Singh india

                Hi, I want to upload the directory on the server. The file upload control is uploading the file not directory. is there a way by which I can upload the directory ? Thanks

                J Offline
                J Offline
                jkirkerx
                wrote on last edited by
                #7

                I think it's a limitation of the browsers capabilities. Keep in mind that HTML elements are an agreed upon standard in which the browser will interpret the element and attempt to render it in the browsers window to the best of it's ability. I did some reading, and Google's Chrome, the latest version supports selecting the whole folder. Keep in mind that you can program the window that opens to select a file to or for, File Extension Types as a filter Single or Multiple Selection so if the browser has the capability, you should be able to toggle that feature. Other programs like uploadify use a combination of JavaScript and a HTTP Request to upload files, and completely bypass the file upload element. An example would be CK-Editor, in which you have to purchase or write a HTTP Handler to upload the file and write it to the server drive. Examples: Upload files using an HttpHandler[^]

                1 Reply Last reply
                0
                • S Samarjeet Singh india

                  Hi, I want to upload the directory on the server. The file upload control is uploading the file not directory. is there a way by which I can upload the directory ? Thanks

                  N Offline
                  N Offline
                  Nathan Minier
                  wrote on last edited by
                  #8

                  If you don't mind postbacks: 1. You'll need to build a custom Javascript window that will enumerate a selected directory, most likely recursively so that you can get the sub-directories. This will replace the file upload window, so plan to code some events and hooks. 2. You'll need some metadata to send with the files to identify where they all belong. You can also do this with AJAX but there are other considerations. Here's a tutorial for your controller: http://www.prideparrot.com/blog/archive/2012/8/uploading_and_returning_files#uploading_multiple_files[^]

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups