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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bhuvanesh MohankumarRank #310 · 8.1K reputationPosted May 11, 2016, 3:17 AM EDT
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);