Index: file_helper.php =================================================================== --- file_helper.php (revision 13321) +++ file_helper.php (working copy) @@ -181,15 +181,27 @@ if (!$image_count) { // no images found in POST -> create default image fields - $image_names = Array ('Primary'.$field_prefix => ''); $image_count = $this->Application->ConfigValue($prefix.'_MaxImageCount'); - $created_count = 1; - while ($created_count < $image_count) { - $image_names[$field_prefix.$created_count] = ''; - $created_count++; + if ($is_image) { + $created_count = 1; + $image_names = Array ('Primary' . $field_prefix => ''); + + while ($created_count < $image_count) { + $image_names[$field_prefix . $created_count] = ''; + $created_count++; + } } + else { + $created_count = 0; + $image_names = Array (); + while ($created_count < $image_count) { + $image_names[$field_prefix . ($created_count + 1)] = ''; + $created_count++; + } + } + $this->createUploadFields($prefix, $image_names, $is_image); return ; }