Resource URLs
The extension that was added to the letterhead templates allowing URLs for an image resource was great but I think it could be extended
Rather than using a fixed url - use a resource url that the image name is attached too
This allows the use of a relative url resource whenever an image needs to be added to a form.
ie
Add a node name "baseURL" to the letterhead template Display- "Image Base Url: " the field value would in effect be something like "https://www.openvpms.org/files/" and the then can be used in reports similarly to
$F{OpenVPMS.location.letterhead.target.baseUrL}+"someImage.png" as a in the image expression in a jasperreport.
This URL could be publicly accessible if you wanted those resources used in html based email OR it could be firewalled where your only using the resources in PDF generation.
I'm interested in others thoughts?
Re: Resource URLs
What do you want to use this for?
If you want to get high availability and reduce traffic, its better to stick logos and other images in Dropbox or some other similar service. In the case of Dropbox, the parent path changes for each file, requiring each image to have its own URL, so a single base URL doesn't help.
Re: Resource URLs
To be fair we already support a version of this in terms of the URL logo in letterhead control. That is a URL that can be used for email logos. Clearly that url needs be publicly available - sure it could be a dropbox link but actually anyone who wants to know how many times an email is read...you would host the image on an apache server. Then you can record how many times its loaded, but thats beside the point.
What I am suggesting is
I might for example create a public directory `http://www.openvpms.org/resources/`
I can upload any image I want available here. Then use said resource in templates.
Now clearly I could use the full link in any custom template, however I am suggesting the letterhead control store the partial url and then the template just declares the 'variable + imagename.jpg' This would then work and allow all sorts of images to be used and reused across a locations templates.
Re: Resource URLs
See https://openvpms.atlassian.net/browse/OVPMS-2093