public function processFiles($event = null)
    {
        /** @var Model $model */
        $model = $this->owner;
        $ids = [];

        if (in_array($model->scenario, $this->scenarios, true)) {
            $files = UploadedFile::getInstances($model, $this->attribute);

            foreach ($files as $file) {
                $model = $this->uploadFile($file);
                $ids[] = $model->id;
            }

            if (!empty($ids)) {
                $this->owner->{$this->targetAttribute} = implode(',', $ids);
            } else {
                // Protect attribute
                $model->{$this->attribute} = null;
            }
        }
    }