Undefined index: file

"Undefined index" means you're trying to read an array element that doesn't exist.

Your specific problem seems to be that you're trying to read upload data that doesn't exist yet: When you first visit your upload form, there is no $_FILES array (or rather, there's nothing in it), because the form hasn't been submitted. But since you don't check if the form was submitted, these lines net you an error:

//Set Temp Name for upload.
$uploaded->set_tmp_name($_FILES['file']['tmp_name']);
//Set file size
$uploaded->set_file_size($_FILES['file']['size']);
//set file type
$uploaded->set_file_type($_FILES['file']['type']);
//set file name
$uploaded->set_file_name($_FILES['file']['name']);

They're all trying to read the value of $_FILES['file'] to pass them to the methods of $uploaded.

What you need is a check beforehand:

if (isset($_FILES['file'])) {
    $uploaded = new upload;
    //set Max Size
    $uploaded->set_max_size(350000);
    //Set Directory
    $uploaded->set_directory("data");
    //Set Temp Name for upload.
    $uploaded->set_tmp_name($_FILES['file']['tmp_name']);
    //Set file size
    $uploaded->set_file_size($_FILES['file']['size']);
    //set file type
    $uploaded->set_file_type($_FILES['file']['type']);
    //set file name
    $uploaded->set_file_name($_FILES['file']['name']);
    //start copy process
    $uploaded->start_copy();
    if($uploaded->is_ok()) 
        echo " upload is doen.";
    else
        $uploaded->error()."<br>";
}

The error is probably in your upload class. The error message is pretty clear, if that is the actual message you get there is probably a line somewhere in that class that looks for an array key I that is named 'fileUpload'.

Just do a search in your code for 'fileUpload', and add something to check if the key is set, ie

 if(isset($arraywhatever['fileUpload'])) condition to your code.