diff --git a/resources/node_resource.inc b/resources/node_resource.inc
index 4fd54e6..100696c 100644
--- a/resources/node_resource.inc
+++ b/resources/node_resource.inc
@@ -627,8 +627,17 @@ function _node_resource_attach_file($nid, $field_name, $attach) {
 
   list($files, $file_objs) = _node_resource_file_save_upload($node_type, $field_name, $options);
 
+  // Retrieve the field settings.
+  $field = field_info_field($field_name);
+
   foreach ($file_objs as $file_obj) {
-    $node->{$field_name}[LANGUAGE_NONE][$counter++] = (array)$file_obj;
+    $counter++;
+    $node->{$field_name}[LANGUAGE_NONE][$counter] = (array)$file_obj;
+    // Check the field display settings.
+    if (isset($field['settings']['display_field'])) {
+      // Set the display option.
+      $node->{$field_name}[LANGUAGE_NONE][$counter]['display'] = $field['settings']['display_field'];
+    }
   }
 
   node_save($node);
