The video is 1.5 meg and yes I can upload a PSD file that is 1.8..
Jay
Minuk Choi wrote:
How big are the video files(byte wise)?
Have you tried uploading a non-video file of the same size?
----- Original Message ----- From: "Jay Fitzgerald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 09, 2004 12:10 PM
Subject: [PHP] Video Uploads
I can upload just about everything with this script; but I don't
understand why it says that the videos i try to upload are zero length.
------------------------------
THE FORM
------------------------------
<form method="post" name="info" enctype="multipart/form-data"
id="x-form" action="add.php">
<input type="hidden" name="max_size" value="51200000">
<input type="file" name="form_data">
<input type="submit" name="submit" value="Add Video"></form>
------------------------------
THE SCRIPT
------------------------------
ini_set ('display_errors', '1');
ini_set ('error_reporting', E_ALL);
if (empty($_POST['submit']))
{
include ('addform.php');
}
else
{
$path =
'/home/mydir/public_html/news/videos/'.$_FILES['form_data']['name'];
$url = 'http://www.mysite.com/news/videos/';
$_POST = array_merge($_POST, $_FILES);
if (!empty($_FILES['form_data']['name']))
{
if ($_FILES['form_data']['size'] == 0)
{
echo 'Problem: '.$_FILES['form_data']['name'].' is zero
length';
}
if ($_FILES['form_data']['size'] > $_POST['max_size'])
{
echo 'Problem: '.$_FILES['form_data']['name'].' is over
'.$_POST['max_size'].' bytes.';
}
if (!is_uploaded_file($_FILES['form_data']['tmp_name']))
{
echo $_FILES['form_data']['name'].' is not uploaded.';
}
move_uploaded_file($_FILES['form_data']['tmp_name'], $path);
}
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php