Can I able to download a file from api response in a JQuery.
Response will be of Base64String which will have memory stream content of multiple files.
Can some one help me in this?
Can I able to download a file from api response in a JQuery.
Response will be of Base64String which will have memory stream content of multiple files.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bhuvanesh MohankumarPosted May 11, 2016, 7:17 AM
This is the code used for downloading a single file using Jquery, I needsame type to download zip file,
HTML:
<iframe id="scriptValue" style="display: none; visibility: hidden">iframe>
var scriptFileName = "SampleFile.txt";
var scriptContent = JSON.stringify(data);
var ifd = document.getElementById('scriptValue').contentDocument;
ifd.open('text/json', 'txt');
ifd.write(scriptContent);
ifd.close();
ifd.execCommand('SaveAs', true, scriptFileName);