Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
I'm new to using Genie (or anything similar) and I need to send some files to the web browser that is running the app.
I'm generating the files no problem, but after pooring over the docs and forums I still can't figure out how to do this. What am I missing?
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
Try storing the files in the public/ folder, (create it first) and then add a link to the file on your page like , or a(href="/filename.zip")
in Julia.
https://learn.genieframework.com/docs/guides/adding-dynamic-pages#including-static-assets
![Author Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
I'm still confused by this, I have a button that generates these files and I want them to be downloaded once generated. Is this possible or should I use a link that the user clicks on?
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
That's a little more difficult to do as it requires adding some javascript. You'd have to add a link to the page. When the file is generated, make the link point to the file and trigger a download. The triggering is done via a Javascript watcher, which check the href attribute of the link and clicks it when it changes. I've added an example for this to the docs
https://learn.genieframework.com/docs/examples/reactive-ui/trigger-download
![Author Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Awesome, that did the trick. Thank you so much!
![Author Avatar](https://cdn.discordapp.com/avatars/960642755799941150/8454099b3f43462890d75bc9c4cd572d.png?size=512)
We have a much smoother way for this kind of task now. See https://github.com/GenieFramework/StippleDownloads.jl