Warning: Undefined array key "HTTPS" in include() (line 29 of /opt/www/fdv2/drupal.stage/web/sites/default/settings.local.php).
include('/opt/www/fdv2/drupal.stage/web/sites/default/settings.local.php') (Line: 4)
require('/opt/www/fdv2/drupal.stage/web/sites/drupal001.net/settings.php') (Line: 145)
Drupal\Core\Site\Settings::initialize('/opt/www/fdv2/drupal.stage/web', 'sites/drupal001.net', Object) (Line: 1099)
Drupal\Core\DrupalKernel->initializeSettings(Object) (Line: 701)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
drupal文件上传时,进度条只显示,没有动态的变化???? - Drupal大学 - Drupal问答论坛
首页 / 帖子
drupal文件上传时,进度条只显示,没有动态的变化????



当查看file.module文件时,


function file_ajax_progress($key) {
  $progress = array(
    'message' => t('Starting upload...'),
    'percentage' => -1,
  );
  $implementation = file_progress_implementation();
  if ($implementation == 'uploadprogress') {
    $status = uploadprogress_get_info($key);
    if (isset($status['bytes_uploaded']) && !empty($status['bytes_total'])) {
      $progress['message'] = t('Uploading... (@current of @total)', array('@current' => format_size($status['bytes_uploaded']), '@total' => format_size($status['bytes_total'])));
      $progress['percentage'] = round(100 * $status['bytes_uploaded'] / $status['bytes_total']);
    }
  }
  elseif ($implementation == 'apc') {
    $status = apc_fetch('upload_'.$key);
    if (isset($status['current']) && !empty($status['total'])) {
      $progress['message'] = t('Uploading... (@current of @total)', array('@current' => format_size($status['current']), '@total' => format_size($status['total'])));
      $progress['percentage'] = round(100 * $status['current'] / $status['total']);
    }
  }
  error_log( $status['current'].'-------'.$status['total'].'-----'.$key );
  drupal_json_output($progress);
}

在上述代码中,$status中本因记录文件的上传的大小和总的大小,但现在,$status中没有任何的值,求解决办法?????

0个答案