I am trying to add a file upload field to all story node forms. I tested the code and I am successfully getting the file upload field on the form.
$form['my_file_upload'] = array( '#attributes' => array('enctype' => 'multipart/form-data'), '#type' => 'file', '#title' => t('Image'), '#description' => t('Image should be of minimum 50x50px width and should be of type png or jpg'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#size' => 48, '#weight' => 4, );
Now the question is How do I validate the file and also how do I retrieve the file after it has passed validation?
(Site runs on Drupal 6)