You are here

public function FileUploaded::uploadAndCommit in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

File

vendor/edsdk/file-uploader-server-php/src/lib/file/FileUploaded.php, line 84

Class

FileUploaded

Namespace

EdSDK\FileUploaderServer\lib\file

Code

public function uploadAndCommit($file) {
  $initName = $this
    ->getName();
  $this
    ->setFreeFileName();
  if (!move_uploaded_file($file['tmp_name'], $this
    ->getFullPath())) {
    throw new MessageException(Message::createMessage(Message::WRITING_FILE_ERROR, $initName));
  }
}