File field URI to URL link in module
Use this:

function fieldmidity_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $settings = $display['settings'];
  $element = array();  

  if ($display['type'] == 'midi_formatter') {
    foreach ($items as $delta =&gt; $item) {
        if ($item['uri']){
            $element[$delta] = array('#markup' =&gt; file_create_url($item['uri']));
        }else{ 
            $element[$delta] = array('#markup' =&gt; $item['uri']);
        }
      // Options for $item; filename, uri, description, filesize, timestamp, fid, uid
    }
  }

  return $element;
}