-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileSaver.JS not working in chrome extension #438
Comments
the same issue. |
@bilalasif Any updates on this issue? Any workaround this problem that you can suggest? I have to meet a deadline and i can't find one 😟 |
Hi Guys I have solved this issue by moving the filesaver from background script to content scripts. |
@bilalasif @gupta82anish I following worked for me
|
@bilalasif @onaralili My extension is in Angular5.. I install FileSaver via |
@bilalasif Also, how did you move it to contentscript if you installed it using bower? |
@gupta82anish moving to contentscript only involved updating my manifest.json, previously I was using it in background script but now i mention it contentscript section of the manifest.json. reader = new FileReader();
reader.readAsDataURL(content);
reader.onloadend = function() {
var base64data = reader.result;
chrome.tabs.sendMessage(tab_id, {method:'removeLoader', content:base64data, name:`${product_id}-${FolderIntials} Images.zip`});
} On contentscript side in the message listener i do the following: if (message.method === "removeLoader"){
message.content = message.content.slice(28);
var blob = b64toBlob(message.content,"application/zip");
// see FileSaver.js
saveAs(blob, message.name);
removeLoader();
} b64toBlob is a custom function and it downloads the zipped file.
Hope this helps |
Hey, i tried using |
Hi,
I had been using FileSaver in my chrome extension for quite some while but it stopped working suddenly. In some other recent issues, I have read that version 1.3.3 is working fine.
I am trying to install 1.3.3 by using "bower install file-saver#1.3.3" it installs 1.3.2, bower.json says it is 1.3.3 but in comments of filesave.js file, it still says 1.3.2. I did a bower cache clean as well any idea what am I doing wrong?
My extension on chrome stopped working unable to identify the reason for that as well.
Installing 1.3.8 via bower does not have the js file.
Any help in this regard would be appreciated.
The text was updated successfully, but these errors were encountered: