public function FileUploaded::uploadAndCommit in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2
Uploads and commits file.
File
- src/
Flmngr/ FileUploaderServer/ lib/ file/ FileUploaded.php, line 123
Class
- FileUploaded
- Uploaded but not commited yet file. Data stucture about file is to be converted to commited file when all validations are passed.
Namespace
Drupal\n1ed\Flmngr\FileUploaderServer\lib\fileCode
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));
}
}