You are here

public function ServletConfig::getTmpDir in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

Overrides IConfig::getTmpDir

File

vendor/edsdk/file-uploader-server-php/src/servlet/ServletConfig.php, line 79

Class

ServletConfig

Namespace

EdSDK\FileUploaderServer\servlet

Code

public function getTmpDir() {
  $dir = $this
    ->getParameter("dirTmp", $this
    ->getBaseDir() . "/tmp", true);
  if (!file_exists($dir)) {
    if (!mkdir($dir)) {
      throw new Exception("Unable to create temporary files directory '" . $dir . "''");
    }
  }
  return UtilsPHP::normalizeNoEndSeparator($dir);
}