I’m running openmrs 2.3.0 Build b3ade0 on intel mac using “Descargar reporte”
It works fine. I’m trying to run the same download on openmrs 2.4.3 using apple m4 and the file could not be found error. Any suggestions on how to get the download working on 2.4.3 would be appreciated. The file of interest is located in the server folder “reports”
Sorry, I wasn’t clear. The files I want to download are only known during runtime so they can’t be included when the module is compiled - they can’t be included in the “omod” file.
Hey Barry – one idea I would start off with is to determine if this is an asset path or resource serving issue, not necessarily a file one.
Since you are using:
ui.resourceLink(‘/reports/individualServicesReport.csv’)
I would double check that:
Is ‘/reports’ still being served as a web accessible resource in version 2.4.3, or has there been any changes in resource resolution?
Does the file work if you navigate to the created url directly in the browser?
Is the file actually located in the modules/resources path that ui.resourceLink() expects, or is it just stored in a server side directory called ‘reports’?
There could be some errors in the logs around permissions/path problems for the file, especially because the environment has also changed (Intel → Apple Silicon).
It may help to debug what URL ui.resourceLink() creates in each version and compare them.
It will be interesting to know if anyone else has run into resource serving issues between 2.3.x and 2.4.x releases.
Thanks much for your help. I just realized I’ll need to maintain the older version of OpenMRS, 2.3.0 so I’ll keep the old code that works for uploading/downloading files.