Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var blob = new Blob([JSON.stringify(photos)], {"type": "application/json"});
- var link = document.createElement("a");
- if(link.download !== undefined) {
- link.setAttribute("href", window.URL.createObjectURL(blob));
- link.setAttribute("download", "photos1.json");
- }
- else {
- link.setAttribute("href", "http://www.example.com/export");
- }
- link.click();
Add Comment
Please, Sign In to add comment