How to programmatically set a file field to allow multiple uploads/values?
my example, see "cardinality" value:

$field = array(
  'field_name' =&gt; 'field_ws_file', 
  'type' =&gt; 'file',
  'cardinality' =&gt; FIELD_CARDINALITY_UNLIMITED,
);
field_create_field($field);


Instead of FIELD_CARDINALITY_UNLIMITED you could also simply use -1.