Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 49

Thread: FTP video upload from form

  1. #11
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    this script runs off your server not ftp.. you don't have to have ftp to upload images or whatever, any more questions let me know...
    Hey new design new look, goto xudas for personal webdsign help.. (:

  2. #12
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Quote Originally Posted by insanemonkey View Post
    this script runs off your server not ftp.. you don't have to have ftp to upload images or whatever, any more questions let me know...
    Videos, however, really need FTP. When I try to upload mpeg videos (or any other type for that matter), the server kills over, if you know what I mean. So, I am really looking for a FTP version right now. (Your right, though, about pics. That type of transfer is perfect for image files or text files.)
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #13
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    oh.. I see what you mean, you have to talk to your hosting company becuase they only allow uploads of up to I think 8mb or 4mb, first try uploading like a mpeg or whatever that is like 4mb and see if it works..
    Hey new design new look, goto xudas for personal webdsign help.. (:

  4. #14
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Quote Originally Posted by insanemonkey View Post
    oh.. I see what you mean, you have to talk to your hosting company becuase they only allow uploads of up to I think 8mb or 4mb, first try uploading like a mpeg or whatever that is like 4mb and see if it works..
    I will be running the server (hosting companies annoy me too much, and I should have the resources to host everything myself). The problem is that the vids are just going to be to big. The type of videos that are going to be on this site are instructional, which means they could very well be 30min long. I know that you can change the settings to allow bigger files and what-not, but at some point you just have to switch to FTP.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  5. #15
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    ftp is for uploading files to a server I don't know if there is a such thing as a program that does this, but..

    if you have your own server and you have php installed on it, then your going to have to look on the web, and find out how you can change the settings to allow uploads from like 8mb to higher,

    but, I don't really know what to do, so I hope you figure it out..
    Hey new design new look, goto xudas for personal webdsign help.. (:

  6. #16
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    What I am really looking for is someone to correct the script at the beginning of this thread. . . It is somewhat functional, but it doesn't insert the data from the uploaded to the stored file.

    EDIT: I found this script:

    Code:
    <?php
    // get FTP access parameters
    $host = $_POST['host'];
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    $destDir = $_POST['dir'];
    $workDir = "/usr/local/temp"; // define this as per local system
    
    // get temporary file name for the uploaded file
    $tmpName = basename($_FILES['file']['tmp_name']);
    
    // copy uploaded file into current directory
    move_uploaded_file($_FILES['file']['tmp_name'], $workDir."/".$tmpName)
     or die("Cannot move uploaded file to working directory");
    
    // open connection
    $conn = ftp_connect($host) or die ("Cannot initiate connection to
     host");
    
    // send access parameters
    ftp_login($conn, $user, $pass) or die("Cannot login");
    
    // perform file upload
    $upload = ftp_put($conn, $destDir."/".$_FILES['file']['name'], 
     $workDir."/".$tmpName, FTP_BINARY);
    
    // check upload status
    // display message
    if (!$upload) {
      echo "Cannot upload";
    } else {
      echo "Upload complete";
    }
    
    // close the FTP stream
    ftp_close($conn);
    
    // delete local copy of uploaded file
    unlink($workDir."/".$tmpName) or die("Cannot delete uploaded
     file from working directory -- manual deletion recommended");
    ?>
    But what is this:
    $workDir = "/usr/local/temp"; // define this as per local system
    I can't figure out what it should be.
    Can anyone help here?
    Last edited by Jas; 10-07-2007 at 09:06 PM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  7. #17
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default FTP video upload from form

    I am really getting tired of google-ing for this, so if you guys can help I would be INSANELY grateful:

    Could someone please post an FTP video upload script (that uses an HTML form). It doesn't have to be fancy, it just has to work. I have been trying and trying for months. . . I don't mean to be so annoying on FTP, but this is the last major step in the project that I am working on (still a long way to go on my site, but nothing major after this).

    Thanks guys.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  8. #18
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    No one knows what it is either, huh? I've been trying various paths, but can figure out what it wants. . .
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  9. #19
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Don't post two threads on the same subject.

    If your host does not allow large uploads, that won't change, no matter what you do after the file is uploaded.

    A file field in a form means that the file is sent onto the server to a temporary directory, found by tmp_name. That's the whole idea. Then it is moved by move_uploaded_file, and you can place it where you want.

    If the host doesn't allow large files, it doesn't matter if you move it, use FTP to place a second instance of itself onto the same host (a complete waste of time/work), or just delete the file-- it won't work.

    If FTP really does allow larger files (and it isn't just the browsers timing out, which is common on large files), then you would need to give everyone access to your FTP account.

    A few ideas for workarounds:
    1. Use a second server and use an FTP upload, but that seems roundabout, and if you have the second server that does work, what's the point?
    2. Use another way to upload the file, like a Java applet, which might be nice for such a large file as it could give the user more info about speed, etc., while uploading.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #20
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Thanks djr33

    Quote Originally Posted by Jas View Post
    I will be running the server (hosting companies annoy me too much, and I should have the resources to host everything myself).
    What should the directory be in the context of the script?
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

Bookmarks

Posting Permissions

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