Is it possible to add additional (image with Image Uploader) attribute to the Catalog Price Rule? If it is, please, tell about it in details. Better with working code example.
What I have now
Now I have only field with image uploader, but it just shows spinner and nothing more.
Code example
<field name="img">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Image</item>
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">catalog_rule</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="string">catalog_rule/promo_catalog/image</item>
</item>
</item>
</argument>
</field>
[UPD]
I have no frontend/routes.xml
in my module. module-catalog-rule
also doesn't have it. I use DI to inject ModelCollectionFactory of this module, where I need it.