Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
BenjaminGroff
Contributor III
Contributor III

QRS API app export request not downloading

Below is the code that is giving me problems, these requests are being made from inside a mashup. My issue is coming from the GET request not downloading the app. My initial POST request to the "/app/{id}/export/{token}" QRS endpoint is returning a download path to me but when I send the GET request to the download path it gives a response but it does not start a download. (Note: This is inside an event listener and the app ID value is coming from the selected element, it is coming through correctly.) Could anyone help show me what I'm missing?

BenjaminGroff_0-1676407342164.png

 

Labels (1)
  • API

1 Solution

Accepted Solutions
colsson
Employee
Employee

Could you try programmatically creating a link element and clicking it to trigger the download?

const link = document.createElement("a");
link.download = // filename
link.href = // download link
link.click();

Source:

How to download file with javascript? - Stack Overflow

View solution in original post

2 Replies
colsson
Employee
Employee

Could you try programmatically creating a link element and clicking it to trigger the download?

const link = document.createElement("a");
link.download = // filename
link.href = // download link
link.click();

Source:

How to download file with javascript? - Stack Overflow

BenjaminGroff
Contributor III
Contributor III
Author

@colsson that worked! Thanks for your help!