At first, I thought I could use the images as static files. If I added them to the public folder I only got to see them when I restarted the Bukdu server.
Then I changed the code as you see below by uncommenting the static route and added a . before /$(params.image)'. Next, I created a new image in the root folder while the server was running. Unfortunately, that didn't work either.
Question: How can I show new images in a browser?
function myimage(c::WebController)
params = c.conn.path_params
render(HTML, "<img src='./$(params.image)' />")
end
routes() do
get("/img/:image", WebController, myimage)
#plug(Plug.Static, at="/", from=normpath(@__DIR__, "public"))
end
At first, I thought I could use the images as static files. If I added them to the
publicfolder I only got to see them when I restarted the Bukdu server.Then I changed the code as you see below by uncommenting the static route and added a
.before/$(params.image)'. Next, I created a new image in the root folder while the server was running. Unfortunately, that didn't work either.Question: How can I show new images in a browser?