I have an API endpoint that returns an xlsx file (Can also be a PDF).
That API endpoint returns the file with the headers:
content-disposition: “attachment; filename*=UTF-8’'MyFilename.xlsx”
When i access that api endpoint from the browser/postman, a browser download popup opens and it downloads the file correctly.
I cant seem to figure out how to download that file through retool once a button is clicked
Retool seems to transform the response into a JSON, where the data contains a message, and the message is a utf-8 of the file (As far as i can see)
Using utils.downloadFile function either on the data or .message downloads something, but it wont open in excel - the file is corrupt.