FTP Upload

Discussion in 'Web Design and Development' started by BakedBeans, Dec 7, 2005.

  1. macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #1
    I need to be able to let customers upload to me via my website - they will be fairly large files, anyone know the easiest way for me to set this up?

    thanks in advance
     
  2. Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
    #2
    What language are you using? What languages do you have access to? I'd use ASP .NET to make a web app that would easily do it.

    Assuming you can only use HTML: Have you tried a link that uses ftp rather than http? Most browsers support some type of FTP.
    The syntax is something like this (it may be a little off though):
    ftp://[username]:[password]@your-domain-name.com

    Hopefully this will at least get you started.
     
  3. macrumors 68020

    dubbz

    Joined:
    Sep 3, 2003
    Location:
    Alta, Norway
    #3
    I'm not sure if it's any help, but here's some kind of uploader script, with a progress bar even, written using PHP and perl. Mega Upload. Obviously requires that your host support PHP and perl.

    And a Multiple file uploader, also written in PHP.
     
  4. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #4
    ok, someone's listening :)

    it might help if i tell you what i want (because i have no real idea of the solution)


    basically, its a photo retouching website so i need a way for customers to upload there images to me. i would like them just to be able to click 'choose file' and then click 'upload' and it to be send to me and stored by my host

    how would i go about that? (talk to me like a baby ;) )
     
  5. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #5

    thanks ill just take a look... something downloaded and plonked on the page sounds good :)
     
  6. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #6
    ok, tried it... to difficult for my simple mind.

    Is there nothing that i can download and host that will just work
     
  7. Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
    #7
    Not that I know of. You're going to need PHP, CGI, ASP, Java, Coldfusion, or something along those lines.
     
  8. Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
    #8
    Here is some javascript code. Looks like you can just paste the code into your website and it will work. You may have to edit it a little. Look like it has a filter on it. I'm not big on javascript though, so I can't give any more info on this.
    http://javascript.internet.com/forms/upload-filter.html
     
  9. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #9
    <form method=post name=upform action="/cgi-bin/some-script.cgi" enctype="multipart/form-data">
    <input type=file name=uploadfile>
    <p>
    <input type=button name="Submit" value="Submit" onclick="LimitAttach(this.form, this.form.uploadfile.value)">
    </form>
    </center>


    looks like i still have to have something in the cgi bin.... any idea what?
     
  10. Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
    #10
    Sorry about that. I guess I should have read all the code before posting. :eek:
     
  11. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #11
    no worries, all i have to do is find a cgi script i suppose.

    anyone :eek:
     
  12. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #12
    can anyone tell me where ive gone wront (the looks are still the downloaded template btw, i need to get it working first)
     
  13. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #13
    Yeah you need script.js on your webserver too :)

    Instead of hasseling with a progress bar, change the following in your upload.php file

    PHP:
            <input type="button" value="Send" onClick="postIt();">
            <!-- 
    uncomment the following to test with out the progress bar -->
            <!
    input type="submit" value="Send">
    to

    PHP:
    <!-- 
    <
    input type="button" value="Send" onClick="postIt();"
    -->
            <!-- 
    uncomment the following to test with out the progress bar -->
            <
    input type="submit" value="Send">
     
  14. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #14
    the script.js is in the php folder.... thats where it was.... :(
     
  15. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #15
    ok, its doing something better.... but still not working properly. can you tell me what im doing wrongly now?
     
  16. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #16
    Check your weblogs for error messages. Can't do much from our end without knowing the errors.
     
  17. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #17
    [2005-12-07 13:04:08]: error: file has no execute permission: (/home/algodden/public_html/retouchartists.com/cgi-bin/progress.cgi)
     
  18. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #18
    Make that file executable. Within telnet/ssh session it would be
    Code:
    chmod 755 /home/algodden/public_html/retouchartists.com/cgi-bin/progress.cgi
    Or your webhost may have a gui with which you can do the same. Finally some FTP clients allow you to set permissions as well. Basically make sure Owner has read/write/execute, Group has read/execute, and Other has read/execute.
     
  19. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #19
    i just cant seem to get this to work... and pretty much dont understand what you just said....

    becoming annoying now :)
     
  20. Guest

    #20
    Probably the easiest way of changing the permissions of a file that you have uploaded is with your FTP client.

    I use Cyberduck (get it, it's free).

    1. Connect to the FTP site where you upload your files to.
    2. Go into the cgi-bin directory
    3. Click once on the file progress.cgi
    The next three steps are probably specific to Cyberduck but I'm sure your FTP client will have a similar way of doing things
    4. Do a File->Get Info (Command I)
    5. In the Dialog Box, Check all 3 boxes for 'Owner', and Read and Execute boxes for 'Group' and 'Others'
    6. Click 'Apply'

    Hopefully that will get you a bit further.
     
  21. thread starter macrumors 68040

    BakedBeans

    Joined:
    May 6, 2004
    Location:
    What's Your Favorite Posish
    #21
    i will pay someone to sort this out for me?

    i just need to upload files from a webpage.... HELP
     

Share This Page