You are here

function imce_js_upload in IMCE 6.2

Same name and namespace in other branches
  1. 6 inc/js.inc \imce_js_upload()
  2. 7 inc/imce.js.inc \imce_js_upload()

Ajax operation: upload

File

inc/imce.js.inc, line 23
Handles ajax file operations.

Code

function imce_js_upload(&$imce) {
  if ($imce['perm']['upload']) {
    $_POST['op'] = t('Upload');
    drupal_get_form('imce_upload_form', array(
      'imce' => &$imce,
    ));
    return array(
      'added' => isset($imce['added']) ? $imce['added'] : NULL,
      'dirsize' => format_size($imce['dirsize']),
    );
  }
}