I've been searching a lot for this, but no luck. I've created a custom file field along with an instance for my custom content type in the .install file.
I've set up everything except that I want that by default this instance of the file file that I created to upload to the 'private' directory and if it's not defined, to define it with this module.
$file_download_link_instance = array(
'field_name' => 'file_download_link',
'required' => true,
'entity_type' => 'node',
'bundle' => $machine_name,
'label' => t('Files to upload'),
'settings' => array(
'file_extensions' => 'txt doc docx pdf ods odt xls xls png jpg jpeg',
'description_field' => TRUE,
),
'description' => t('Please upload here the files.'),
'display' => array(
'default' => array(
'type' => 'hidden',
),
'teaser' => array(
'type' => 'hidden',
),
),
'locked' => TRUE,
);
I believe that I have to edit the 'settings' array, but I don't know the syntax. Thanks!