private function getFileFieldsByDynamic(Dynamic $dynamic)
    {
        $form = $dynamic->getForm();

        $fields = $form->getFieldsByType(Dynamic::TYPE_ATTACHMENT);

        if (0 === count($fields)) {
            return [];
        }

        $collectionId = $this->getCollectionIdByDynamic($dynamic);

        $fileFields = [];
        foreach ($fields as $field) {
            $fileFields[$field->getKey()] = $collectionId;
        }

        return $fileFields;
    }