I have a CCK custom type that ask some info to the user and uses those info to generate a file using computed fields. The last thing i have to do is find a way to attach this file to the node or at least put a link into the node to allow the user to download the file that has been generated. The code on the computed field is:
$usr=$field_ident[0]['value']; //get username
$day=$field_timespan[0]['value']; //get days
$data=my_call_procedure($usr,$day); //call a procedure that gives back some data
$filereturned=my_data_save($data); //save the data n a file
$node_field[0]['value'] = $filereturned; //get the path of the file
The string i get back is:
sites/default/files/2012-06-13_user_filename.txt
I need to make a link out of this string, or to attach the file to the node being created, so the user can download the file that has been generated. How do i do that?