code: public function getFileEntity()
      {
          if (!$this->form || !($object = $this->form->getObject())) {
              return null;
          }
  
          if ($this->isMultiple()) {
              return $object;
          }
  
          $entityName = $this->getName();
  
          try {
              $fileEntity = $object->{"get" . $entityName}();
          } catch (\OutOfBoundsException $e) {
              return null;
          }
  
          return $fileEntity;
      }
docs: Gets the file entity bound to the containing form,
  Returns <i>NULL</i>, if the entity cannot be retrieved or is not set in the form.
  
  @return null|Collection|\Core\Entity\FileInterface