function after_add() {
if ( $this->is_postback() ) {
FUSE::Require_class('File/FileUpload');
$upload = new FileUpload();
$upload->file_input_name = 'waiver_file';
$upload->destination_dir_create = true;
$upload->allow_file_extension( 'pdf' );
$upload->destination_path = APP_BASE_PATH . DIRECTORY_SEPARATOR . 'files'
. DIRECTORY_SEPARATOR . $this->job->id . ".pdf";
$upload->process();
parent::after_add();
}
}
Note that I call parent::after_add() once I'm finished so that the regular FuseApplicationController after_add() method can take over and display a "changes saved" message to the user.