You are here

function ueditor_get_savepath in UEditor - 百度编辑器 8

Same name and namespace in other branches
  1. 7.3 ueditor.module \ueditor_get_savepath()
  2. 7.2 ueditor.module \ueditor_get_savepath()

ueditor get the save path.

5 calls to ueditor_get_savepath()
Lists::getfiles in src/Lists.php
遍历获取目录下的指定类型的文件
Upload::getFilePath in src/Uploader/Upload.php
获取文件完整路径
UploadCatch::doUpload in src/Uploader/UploadCatch.php
UploadFile::doUpload in src/Uploader/UploadFile.php
UploadScrawl::doUpload in src/Uploader/UploadScrawl.php

File

./ueditor.module, line 47
Provides integration with the UEditor WYSIWYG editor.

Code

function ueditor_get_savepath($path) {
  global $base_root;
  $site_path = \Drupal::service('site.path');
  $basePath = base_path();
  $filedir = Settings::get('file_public_path', $site_path . '/files');
  if ($path) {
    $savePath = str_replace($basePath . $filedir . '/', "", $path);
    $savePath = str_replace($base_root, "", $savePath);
  }
  return $savePath;
}