Make file available upon user button click.
Unanswered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
My API grabs some data, generates an excel file and then uploads the file to Cloudinary. When the user clicks a button I need the excel file to be available to them for download. It appears with Cloudinary the file link is saved in result.secure_url. I'm stuck on how to get this link into a clickable button. I think I need to setup a route or a GET request but unsure how to go about this.
2 Replies
I use [FileSaver](https://www.npmjs.com/package/file-saver) to download files. You can just pass an URL, I don't know cloudinary but I assume
secure_url is just a pre-signed url that you can simply pass?Northeast Congo LionOP
Thanks. I had to get the cloudinary url that was generated in a parent page over to child page with props and now it looks like I have to figure out how to set up use state to deal with a dynamic url.