setErrorCode("4112");
$errorCode = 4112;
$returnMessage = "The uploaded file was corrupt. Please verify that the file is in the " ." the correct file format.
";
}
}
else
{
if (is_null($_FILES["softwareUpdate"]))
{
error_log("The file is too big. softwareUpdate was NULL");
$status->setErrorCode("4109");
$returnMessage = "The file was not found. The file may be too big.";
}
else
{
switch ($HTTP_POST_FILES['softwareUpdate']['error'])
{
case 1 : //uploaded file exceeds the upload_max_filesize directive in php.ini
case 2 : //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
error_log("The file you are trying to upload is too big.");
$status->setErrorCode("4109");
$returnMessage = "The file you are trying to upload is too big.
";
break;
case 3 : //uploaded file was only partially uploaded
error_log("The file you are trying upload was only partially uploaded.");
$status->setErrorCode("4110");
$returnMessage = "The file you are trying to upload was only partially uploaded.
";
break;
case 4 : //no file was uploaded
error_log("You must select an image for upload.");
$status->setErrorCode("4111");
$returnMessage = "The file you are trying to upload was not found.
";
break;
default : //a default error, just in case! :)
error_log("There was a problem with your upload.");
$status->setErrorCode("4108");
$returnMessage = "There was a problem with your upload.
";
break;
}
}
$errorCode = $status->errorCode;
}
}
$url = 'unknown';
$filename = 'sl_lib_firmware_set.htm';
$line = 'unknown';
$symbols = 'none';
$returnMessage = $returnMessage."
File you are trying to upload: ".$_FILES['softwareUpdate']['name'];
?>