Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts

    Way to Upload Entire Folder?

    Hello,
    I want to be able to upload an entire folder to my web host with a script. Is this possible? Right now I can only figure out how to upload individual files.

  • #2
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    You'd have to use a Java component to do this. Most popular search engines will give you plenty of results for that.

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,107
    Thanks
    2
    Thanked 326 Times in 318 Posts
    Is this just for your use or do you want general visitors to be able to upload a folder?

    If this is just for your use, most FTP clients allow drag and drop folder upload. You can also zip the files, upload the .zip file, then unzip on the server.

    Just using the normal browser/http upload support, you can only select one file at a time. There are a number of upload scripts that lets you dynamically keep adding individual files to an upload form (this works until the total size reaches the upload size settings on the server.)

    Here is a java applet that claims (I have not used it) to allow folder uploads - http://www.jumploader.com/ This requires the java runtime environment to be installed on the client's computer.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts
    Hmm, Ok .

    I want it because im making a script that allows people to upload templates. As of now i dynamicaly create a new folder in which their css/HTML files gets uploaded to. The problem I am having is thinking of an easy way to upload all their images. As of now my scrip creates another folder called "images" and then the user must upload images one by one.

  • #5
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    Yes, that's how it has to be.

    Unless you use the Java solution, which is not compatible with everyone. But it might work depending on project requirements.

  • #6
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    Could you ask users to zip the directory and upload that? You can then unzip it when it gets to the server.
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •