You are here

protected function AActionUploadId::validateUploadId in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

4 calls to AActionUploadId::validateUploadId()
ActionUploadAddFile::run in vendor/edsdk/file-uploader-server-php/src/lib/action/ActionUploadAddFile.php
ActionUploadCancel::run in vendor/edsdk/file-uploader-server-php/src/lib/action/ActionUploadCancel.php
ActionUploadCommit::run in vendor/edsdk/file-uploader-server-php/src/lib/action/ActionUploadCommit.php
ActionUploadRemoveFile::run in vendor/edsdk/file-uploader-server-php/src/lib/action/ActionUploadRemoveFile.php

File

vendor/edsdk/file-uploader-server-php/src/lib/action/AActionUploadId.php, line 17

Class

AActionUploadId

Namespace

EdSDK\FileUploaderServer\lib\action

Code

protected function validateUploadId($req) {
  if ($req->uploadId === null) {
    throw new MessageException(Message::createMessage(Message::UPLOAD_ID_NOT_SET));
  }
  $dir = $this->m_config
    ->getTmpDir() . "/" . $req->uploadId;
  if (!file_exists($dir) || !is_dir($dir)) {
    throw new MessageException(Message::createMessage(Message::UPLOAD_ID_INCORRECT));
  }
}