Hi Eliot,
the content in the webap/static folder is served statically at the .../static/myresource path.
Symlinking your folder in there should do the trick. At least up to previous versions of Basex. You could just ad <img src="/static/myresoiurce"/> in your page...
I think I've read in tne ML about some issues recently with symlinking but I have not investigated in depth the issue ...
Check it out.
M.
On 06/07/22 21:08, Eliot Kimber wrote:
In my RESTXQ application, I have the XML content in a database but the images referenced from that content is only in a local clone of the git repository from which the XML content is loaded into BaseX.
I would like to serve the images from RESTXQ-generated HTML Pages but I’m not sure how to do that other than to use URLs that include the base64 image data directly.
What I think I need to do is implement a RESTXQ end point that handles image URLs that I know how to convert into image files on the file system but I don’t see how to then return the raw bytes as the return result from the RESTXQ handler function.
I’m trying to avoid copying the images because there’s no other reason to have them in a database or otherwise copy them somewhere else on the file system.
I suppose I could symlink the git directories under the webapp directory but that seems kind of icky too.
Thanks,
E.
*Eliot Kimber*
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com https://www.servicenow.com
LinkedIn https://www.linkedin.com/company/servicenow | Twitter https://twitter.com/servicenow | YouTube https://www.youtube.com/user/servicenowinc | Facebook https://www.facebook.com/servicenow