function file_entity_add_upload

cis7 file_entity.pages.inc file_entity_add_upload($form, &$form_state, array $options = array())
cle7 file_entity.pages.inc file_entity_add_upload($form, &$form_state, array $options = array())
elmsmedia7 file_entity.pages.inc file_entity_add_upload($form, &$form_state, array $options = array())
icor7 file_entity.pages.inc file_entity_add_upload($form, &$form_state, array $options = array())
meedjum_blog7 file_entity.pages.inc file_entity_add_upload($form, &$form_state, array $options = array())
mooc7 file_entity.pages.inc file_entity_add_upload($form, &$form_state, array $options = array())

Form callback for adding a file via an upload form.

This is a multi step form which has 1-3 pages:

  • Upload file
  • Choose filetype If there is only one candidate (based on mimetype) we will skip this step.
  • Edit fields Skip this step if there are no fields on this entity type.
1 call to file_entity_add_upload()
file_entity_add_upload_multiple in sites/all/modules/ulmus/file_entity/file_entity.pages.inc
Form for uploading multiple files.
2 string references to 'file_entity_add_upload'
file_entity_menu in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_menu().
MediaBrowserUpload::view in sites/all/modules/ulmus/media/includes/MediaBrowserUpload.inc
Implements MediaBrowserPlugin::view().

File

sites/all/modules/ulmus/file_entity/file_entity.pages.inc, line 68
Supports file operations including View, Edit, and Delete.

Code

function file_entity_add_upload($form, &$form_state, array $options = array()) {
  $step = (isset($form_state['step']) && in_array($form_state['step'], array(1, 2, 3, 4))) ? $form_state['step'] : 1;
  $form['#step'] = $step;
  switch ($step) {
    case 1:
      return file_entity_add_upload_step_upload($form, $form_state, $options);

    case 2:
      return file_entity_add_upload_step_filetype($form, $form_state, $options);

    case 3:
      return file_entity_add_upload_step_scheme($form, $form_state, $options);

    case 4:
      return file_entity_add_upload_step_fields($form, $form_state, $options);

  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.