How embed a csv file in custom plugin

Hi,
I am developing a custom ui plugin where i want to give a button to download a template csv file, and here what i did, i added the button like this in my html file.,

 <p>
                                <button id="csv-download-button" class="btn btn-sm btn-success"
                                    onclick="document.getElementById('download_csv').click()">Click here to download</button>
                                <a hidden="true" id='download_manual_link'
                                    href="#{plugins.requestContextPath}/plugin/test/ui/template.csv"
                                    download="template.csv">click here</a>
                            </p>

I placed my template.csv file in /plugin/ui/template.csv in the zip file for the plugin, but when i import the plugin and click on the link, nothing happens.
when i directly access the plugin url, it throws 404 not found error.

Any help is appreciated.

From my experience, SailPoint seems to only allow some specific file extensions to be exposed via the /plugin/ URL (i.e. images, xhtml, html, css and js).

You may need to pack your CSV file as a Java resource (i.e. put it alongside your class files) and provide a REST API to retrieve it.