Skip to content
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

Загрузка файла с правильным именем #10

Closed
The28AWG opened this issue Jan 3, 2012 · 1 comment
Closed

Comments

@The28AWG
Copy link

The28AWG commented Jan 3, 2012

var zip = new JSZip();
zip.add("Hello.txt", "Hello World\n");
img = zip.folder("images");
img.add("smile.gif", imgData, {base64: true});
content = zip.generate();
var a = document.createElement("a");
a.innerHTML = "download";
a.href = "data:application/zip;base64,"+content;
//a.download = "foobar.zip";
a.setAttribute("download", "foobar.zip");
document.body.appendChild(a);
@The28AWG The28AWG closed this as completed Jan 4, 2012
@VityaSchel
Copy link

text/plain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants