- $fileHelper = new ttFileHelper($err);
- $fields = array('description'=>$cl_description); // TODO: add other fields here if required.
- if (!$fileHelper->putFile($fields)) {
- $err->add($i18n->get('error.expired'));
+ $fields = array('entity_type'=>'project',
+ 'entity_id' => $cl_project_id,
+ 'file_name' => $_FILES['newfile']['name'],
+ 'description'=>$cl_description);
+ if ($fileHelper->putFile($fields)) {
+ header('Location: project_files.php?id='.$cl_project_id);
+ exit();