Common\Doctrine\ValueObject\AbstractImage::upload PHP Method

upload() public method

This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate()
public upload ( )
    public function upload()
    {
        $file = $this->getFile();
        parent::upload();
        if (static::GENERATE_THUMBNAILS && $file instanceof UploadedFile) {
            Model::generateThumbnails(FRONTEND_FILES_PATH . '/' . $this->getTrimmedUploadDir(), $this->getAbsolutePath('source'));
        }
    }