Upload folder (and subfolders)

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

    Upload folder (and subfolders)

    Is it possible to upload a complete folder including the subfolders using
    PHP ?

    Regards,

    Robertico


  • Mustafa Yalcin Acikyildiz

    #2
    Re: Upload folder (and subfolders)

    as far as i know this is not possible

    Comment

    • BLob

      #3
      Re: Upload folder (and subfolders)

      > Is it possible to upload a complete folder including the subfolders using[color=blue]
      > PHP ?[/color]

      The user has to zip the folder, upload the zipped file through an HTML form,
      and your script can unzip the file on the server side, an re-create the
      subfolders. Otherwise it is impossible to browse the client's hard drive or
      to upload a whole folder using an HTML form (this is a necessary limit of
      HTML forms). Other solutions might use ActiveX, Java Applets, or things like
      that.

      BLob


      Comment

      • Juha Suni

        #4
        Re: Upload folder (and subfolders)

        > Is it possible to upload a complete folder including the subfolders[color=blue]
        > using PHP ?[/color]

        The upload functionality (the file input element) in current browsers does
        not support this. Therefore it is not possible with a serverside techology.

        You can not even try to automate it with DHTML autofilled file input fields
        either since the element is write protected for obvious security reasons.

        You would need more than a little clientside (Java) coding to accomplish
        something like that.

        I'd recommend teaching users to zip their folders (which is easy with a
        right click on Win) and then upload them. You could then automate the
        unzipping process of the folder(s) on the server.

        HTH

        --
        Suni


        Comment

        • juglesh

          #5
          Re: Upload folder (and subfolders)


          Robertico wrote:[color=blue]
          > Is it possible to upload a complete folder including the subfolders using
          > PHP ?[/color]

          Not 'less you zip it, like blob says.

          but I've tried a few Java thingers that work:

          JUpload is a client-side upload agent that provides features not found in traditional HTML form-based uploading. However, being a Java applet, JUpload also provides something XUpload lacks - browser independence. This applet is 'given' with the GPL licence. JUpload takes care of the limitation posed by traditional HTML upload forms by allowing you to

          Download File Upload Applet for free. A tool for web developpers, to get rid of HTML upload limitation. AS OF JAVA PLUGIN DEPRECATION: applet execution within the navigator is "in danger". But JUpload applet can executed in JNLP mode, or within your java application.


          --
          juglesh

          Comment

          • Robertico

            #6
            Re: Upload folder (and subfolders)

            Thanks all for the explanation.

            Robertico


            Comment

            Working...