protected function validateResource(KalturaResource $resource, SimpleXMLElement $elementToSearchIn) { if ($resource instanceof KalturaDropFolderFileResource) { $fileId = $resource->dropFolderFileId; if (is_null($fileId)) { throw new KalturaBulkUploadXmlException("Drop folder id is null", KalturaBatchJobAppErrors::BULK_ITEM_VALIDATION_FAILED); } $dropFolderFile = $this->kClient->dropFolderFile->get($fileId); if (!$dropFolderFile) { throw new KalturaBulkUploadXmlException("Cannot find drop folder file with id [{$fileId}]", KalturaBatchJobAppErrors::BULK_ITEM_VALIDATION_FAILED); } } return parent::validateResource($resource, $elementToSearchIn); }
protected function validateResource(KalturaResource $resource, SimpleXMLElement $elementToSearchIn) { if ($resource instanceof KalturaDropFolderFileResource) { $fileId = $resource->dropFolderFileId; if (is_null($fileId)) { throw new KalturaBulkUploadXmlException("Drop folder id is null", KalturaBatchJobAppErrors::BULK_ITEM_VALIDATION_FAILED); } $filePath = $this->getFilePath($elementToSearchIn); $this->validateFileSize($elementToSearchIn, $filePath); if ($this->dropFolder->type == KalturaDropFolderType::LOCAL) { $this->validateChecksum($elementToSearchIn, $filePath); } } return parent::validateResource($resource, $elementToSearchIn); }