Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I've made all the process to get the url to download my file but when I get the qUrl I can't just download the file using node.
// Generate Sheet with data. var sheet = await app.getObject('e86fbce8-3aa3-4be0-8081-d55a1f4cd531') //Generate download link var exportResult = await sheet.exportData("OOXML", "", "export.xlsx"); console.log(exportResult);
under exportResult I got
{ qUrl: '/tempcontent/ABCD/fileName.xlsx?serverNodeId=nodeId', qWarnings: [] }
and im stuck at the point of download.
if I concatenate the url of my qliksense url with the qUrl and paste it in the browser it download the file. but I need to download the file from the Node server.
I use ?QlikTicket=abcd1234 to authenticate.
Can I use this session to download the file ?
const session = enigma.create({ schema, url: `https://${qsAppHost}/app/engineData?QlikTicket=${qsTicket}`, createSocket: (url) => new WebSocket(url, { headers: { 'X-Qlik-User': `UserDirectory=${encodeURIComponent(qsQpsTicketBody.UserDirectory)}; UserId=${encodeURIComponent(qsQpsTicketBody.UserId)}`, }, }), });