0

I want implement upload zip file using FORM API where I want to show the progress bar for uploading file so I have written code like:

$step2['browse']=array(
        '#type'=>'managed_file',
        '#id'=>'choose',
        '#progress_indicator' => 'bar',
        '#progress_message'=> 'File is Uploading',
        '#upload_validators' => array(
        'file_validate_extensions' => array('zip rar')),
        '#upload_location' => 'public://',

      );

But when I am trying to upload zip file using this form, my upload file field disappears automatically and also upload button disappears with it.

I am not getting what is wrong with this field.

I have applied 2 patches but that doesn't helps.

  • The usual cause for this sort of error is folder permissions. Check that the web server can write to the folders designated for temp and public. – Alfred Armstrong Jan 8 at 14:18
  • Also, have you checked the watchdog log for errors? – Alfred Armstrong Jan 8 at 14:18
  • no error or warning in Drupal recent log messages – Akki Jan 9 at 7:51

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.