drupal_render. filefield HEAD should be DRUPAL-5 compatible. I will branch for DRUPAL-5 once I've tested with DRUPAL-5 cck.