Ok, I'm bested. I found (and tailored) this PHP code to upload files I a specific location. It works for most files (JPGs, GIFs, TXTs), but I need it to upload mp4s. Whenever I do, it runs for a while, then throws an error. I think the file is getting half-uploaded, but not showing in my FTP (using WinSCP).

I am not sure if there is a problem with the code or whatever, but it seems to execute the code just fine and finishes, but it gives me an error and doesn't display any text. The file also doesn't show in FTP.

Any ideas why this could not be working?

FYI, the file is about 12Mb.

Thanks,
Multi


Code:
if ($_FILES["file"]["size"] < 20000000)
  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("videos/" . $_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ";
      }
    else
      {
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "videos/" . $_FILES["file"]["name"]);
      echo "Stored in: " . "videos/" . $_FILES["file"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }