Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
ErikWetterberg

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.

Anonymous
Not applicable
Author

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)

ErikWetterberg

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