Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
zadravecm
New Contributor III

Store file to disk from extension

Hi,

I am creating my first extension, and I need to store data in Json or xls file to disk.

How to do this? I am looking that JS does not allow to download files? But Qlik sense has

Store table into lib://test/file.csv (txt, delimiter is ';');

function.

How to do similar inside extension?

3 Replies
erik_wetterberg
Honored Contributor

Re: Store file to disk from extension

Hi,

You could use a ja library like FileSaver: GitHub - eligrey/FileSaver.js: An HTML5 saveAs() FileSaver implementation

I've used it in mashups, but not in extensions, but it should work.

Erik Wetterberg

Please mark the reply as Helpful and/or Correct if you find it useful.

Erik Wetterberg
https://extendingqlik.upper88.com/
zadravecm
New Contributor III

Re: Store file to disk from extension

Hi Erik,

Thank you for reply. I found how to save a BLOB file to the disk, but the problem is that this could be only saved to Download file. (you can't specify the path on which you can download it).

That's why I am asking for a Qlik Sense Api solution, because I believe (but I could be wrong) that js doesn't have this options (because security reasons)

erik_wetterberg
Honored Contributor

Re: Store file to disk from extension

Then you would need some sort of server implementation. The only one I know that's included with Qlik Sense is the one used for extensions: Extension: Create or update a file in an extension ‒ Qlik Sense Developers

This is limited to only extension files, so might not be what you need. You probably would need to implement your own server component, or find a open source solution.

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/