You are here

protected function Upload::getFilePath in UEditor - 百度编辑器 8

获取文件完整路径

Return value

string

3 calls to Upload::getFilePath()
UploadCatch::doUpload in src/Uploader/UploadCatch.php
UploadFile::doUpload in src/Uploader/UploadFile.php
UploadScrawl::doUpload in src/Uploader/UploadScrawl.php

File

src/Uploader/Upload.php, line 188

Class

Upload
UEditor编辑器通用上传类

Namespace

Drupal\ueditor\Uploader

Code

protected function getFilePath() {
  $site_path = \Drupal::service('site.path');
  $fullname = ueditor_get_savepath($this->fullName);
  $uploadPath = Settings::get('file_public_path', $site_path . '/files');
  $rootPath = strtr(DRUPAL_ROOT, '\\', '/');
  if (substr($fullname, 0, 1) != '/') {
    $fullname = '/' . $fullname;
  }
  return $rootPath . '/' . $uploadPath . $fullname;
}