You are here

protected function MediaBulkUploadForm::validateFilename in Media Bulk Upload 8

Validate if the filename and extension are valid in the provided file info.

Parameters

array $fileInfo: File info.

Return value

bool If the file info validates, returns true.

1 call to MediaBulkUploadForm::validateFilename()
MediaBulkUploadForm::processFile in src/Form/MediaBulkUploadForm.php
Process a file upload.

File

src/Form/MediaBulkUploadForm.php, line 426

Class

MediaBulkUploadForm
Class BulkMediaUploadForm.

Namespace

Drupal\media_bulk_upload\Form

Code

protected function validateFilename(array $fileInfo) {
  return !(empty($fileInfo['filename']) || empty($fileInfo['extension']));
}