Common/Listener/UploadableListener.php
public function prePersist(UploadableInterface $uploadable)
    {
        if (!$this->enabled) {
            return;
        }

        // TODO Remove (when handled by resource behavior).
        $uploadable
            ->setCreatedAt(new \DateTime())
            ->setUpdatedAt(new \DateTime());

        $this->uploader->prepare($uploadable);
    }
public function prePersist(UploadableInterface $uploadable)
    {
        if (!$this->enabled) {
            return;
        }

        // TODO Remove (when handled by resource behavior).
        $uploadable
            ->setCreatedAt(new \DateTime())
            ->setUpdatedAt(new \DateTime());

        $this->uploader->prepare($uploadable);
    }
Pre persist event handler.

@param UploadableInterface $uploadable