Can we download a CSV file using link and open it in retool?

Currently, I am trying to download a file using href but it downloading in browser and I am not able to access/read it's content in retool.

Hey Samuel!

You cannot directly download to Retool.

What you can do is either find an API that can pass the data to retool or store the data in a database which you can read from in retool.

Additionally, you can create fileInput component and manually add the file that you need so you can parse/read it and make changes to it.

Hope that helps!

1 Like

Hey folks!

If the file is publicly accessible, you should actually be able to pass the file URL into a GET request using a REST query. The query will return the file inside of Retool in it's queryName.data property when run!

Since you mentioned this is a CSV as well, I'd recommend using the natively included PapaParse library in a transformer on the query to parse the CSV as JSON which will make the values directly referenceable inside of Retool.

Let me know if you run into any issues doing so!

1 Like