function slet_called(request, response)
{
//get the file_id from the query paramater
var file_id = request.getParameter('file_id');
try
{
//get the file
file = nlapiLoadFile(file_id);
//write the file to the response
response.setContentType( 'rtf', file.getName(), 'attachment' );
response.write(file);
}
catch(error)
{
//do something if the file doesn't exist anymore
}
}