Hi all
My first attempt at putting together a browser-based interface and also any form of web programming, so I really don’t know what it is that I don’t know. Apologies for asking the obvious. I am using Oxygen.jl for this.
I get inputs via an html form and pass that to my functions that generate a few plots and save them to .svg files. I then try to return these to the user via
html("""
<img src="./npv.svg" width="600" height="400">
<img src="./fi.svg" width="600" height="400">
<img src="./cashflows.svg" width="600" height="400">
<img src="./pv_cashflows.svg" width="600" height="400">
""")
This however just puts four empty placeholders in the browser. I also tried with fully qualified filenames and the same thing happens.
The server log shows:
[ Info: 📦 Version 1.7.1 (2025-02-06)
[ Info: ✅ Started server: http://127.0.0.1:8080
[ Info: 📖 Documentation: http://127.0.0.1:8080/docs
[ Info: 📊 Metrics: http://127.0.0.1:8080/docs/metrics
[ Info: Listening on: 127.0.0.1:8080, thread id: 1
[ Info: 2025-02-26T16:41:23 - 127.0.0.1:59247 - "GET /project HTTP/1.1" 200
[ Info: 2025-02-26T16:41:31 - 127.0.0.1:59247 - "POST /form HTTP/1.1" 200
I looked for examples, but came up empty. I am honestly stumped at the moment. How would I return generated plots? Are there any examples somewhere I can look at?