public function ActionUploadRemoveFile::run in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7
Overrides AAction::run
File
- vendor/
edsdk/ file-uploader-server-php/ src/ lib/ action/ ActionUploadRemoveFile.php, line 23
Class
Namespace
EdSDK\FileUploaderServer\lib\actionCode
public function run($req) {
$this
->validateUploadId($req);
$file = new FileUploaded($this->m_config, $req->uploadId, $req->name, $req->name);
$file
->checkForErrors(true);
if ($file
->getErrors()
->size() > 0) {
throw new MessageException(Message::createMessageByFile(Message::UNABLE_TO_DELETE_UPLOAD_DIR, $file
->getData()));
}
$file
->delete();
return new RespOk();
}