Upload file in system_settings_form in Drupal 6 I have a code that was supposed to upload 2 files:

function lafemme_background_images_form() {

    $form = array();

    $form['#attributes']['enctype'] = "multipart/form-data";

    $form['background_left'] = array(
        '#type' =&gt; 'file',
        '#title' =&gt; 'Obrázok na ľavej strane',
        '#required' =&gt; TRUE,
    );
    $form['background_right'] = array(
        '#type' =&gt; 'file',
        '#title' =&gt; 'Obrázok na pravej strane',
        '#required' =&gt; TRUE,
    );

    return system_settings_form($form);
}

function lafemme_background_images_form_submit($form, $form_state) {

    $validators = array(
        'file_validate_extensions' =&gt; array('jpg','jpeg','bmp','png', 'gif'),
    );

    $file_left = file_save_upload('background_left', $validators, '/sites/default/files/lafemme/backgrounds/');
    $file_right = file_save_upload('background_right', $validators, '/sites/default/files/lafemme/backgrounds/');

    if ($file_left) {       
        drupal_set_message('Obrázok na ľavej strane je nastavený');     
    } else {
        drupal_set_error('background_left', 'Chyba pri uploade ľavého obrázka');
    }

    if ($file_right) {      
        drupal_set_message('Obrázok na pravej strane je nastavený');        
    } else {
        drupal_set_error('background_right', 'Chyba pri uploade pravého obrázka');
    }

}


But it doesn't work. Form is acting like there are no files selected on submit even if they are. Later I found out that it doesn't work probably becouse of system_setting_form function. In drupal 7 there is a managed_file type of input. But what about Drupal 6? It is possible to upload a file in system_setting_form()?
I found the problem: https://www.drupal.org/node/64984

Drupal 6 won't upload a file if file field is required. 

Such an enormous bug. No mention in documentation about that, you have to find it yourself. 
Drupal can be really disappointing...