Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11
Hello Tapabrata Banerjee [Inactive] [NO DM], For security reasons, SoloLearn has blocked the download of files... For this to work, you must use something other than SoloLearn.
30th Aug 2021, 6:49 AM
Wixonic (contact: description)
Wixonic (contact: description) - avatar
+ 10
i have made this for u , have a look : https://code.sololearn.com/WHgW3jJ92hlY/?ref=app i am using PC right now so if it doesn't work on sololearn app try to use it on PC it will work😁😀
30th Aug 2021, 6:00 AM
Pariket Thakur
Pariket Thakur - avatar
+ 6
<a href="image path " download="image"> using JavaScript : var a = document.createElement('a'); a .href = 'image path'; a.download = 'image.jpg'; document.body.appendChild(a); a.click();
30th Aug 2021, 4:35 AM
Pariket Thakur
Pariket Thakur - avatar
30th Aug 2021, 4:59 AM
BroFar
BroFar - avatar
+ 5
Prashanth Kumar Having good skills does not make you superior.
1st Sep 2021, 1:31 PM
Wixonic (contact: description)
Wixonic (contact: description) - avatar
+ 5
Please I ask you all to stay relevant and answer Tapabrata Banerjee [Studying - NO DM] [BUSY] .. This cross-talking is not beneficial to the question at hand or the community. Thank you in advance for your cooperation. BroFar - Gold Moderator
1st Sep 2021, 7:08 PM
BroFar
BroFar - avatar
+ 5
Well everyone stop fighting here. Do you want to create Code Group War(ww1) in which Allies consists of = Runtime Terror(sorry for mentioning you here because you said not to) ,Prashanth Kumar Axis consists of = Wixonic , David Ordás We all are coders we should not fight,or by saying not so good things to make any other person feelings hurt we should all discuss every problem with calmness of true mind, collaboration 😄 like a team, happiness while talking😀 like friends, that is all for it Happy Coding!
1st Sep 2021, 7:10 PM
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃)
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃) - avatar
+ 5
Prashanth Kumar OK 🙂, friend
1st Sep 2021, 7:20 PM
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃)
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃) - avatar
30th Aug 2021, 6:51 AM
Wixonic (contact: description)
Wixonic (contact: description) - avatar
30th Aug 2021, 6:59 AM
Wixonic (contact: description)
Wixonic (contact: description) - avatar
30th Aug 2021, 1:40 PM
BroFar
BroFar - avatar
+ 4
Of course, but not through an iframe/AJAX if has different urls due to content security policies. Sololearn web codes are executed in an iframe Take a look at: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP Here a snippet I've made to download github labels in json, yml format... mainly using a Blob object https://gist.github.com/davorpa/8201479803ff2a9bcc93a76a8fe71e43#file-export-github-repo-labels-js-L47 save function is your code function save(filename, type, content) { const blob = new Blob([content], { type: type }); const e = document.createEvent("MouseEvents"); const a = document.createElement("a"); a.download = filename; a.href = window.URL.createObjectURL(blob); a.dataset.downloadurl = [type, a.download, a.href].join(":"); e.initMouseEvent("click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); a.dispatchEvent(e); } and use it... save("secrets.txt", "text/plain", "Hello World!"); save("sololearn.png", "image/png", bytes); ....
31st Aug 2021, 8:38 AM
David Ordás
David Ordás - avatar
+ 4
I'm not fighting. I post solutions and arguments related with question. The End. Unsusbcribed from this Q&A
2nd Sep 2021, 10:14 PM
David Ordás
David Ordás - avatar
+ 3
Tapabrata Banerjee [Inactive] [NO DM] Wixonic OK my bad I didn't understand 😕
30th Aug 2021, 6:56 AM
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃)
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃) - avatar
+ 3
Tapabrata Banerjee [Inactive] [NO DM] the code i gave u will work on PC have u tried ??
30th Aug 2021, 1:18 PM
Pariket Thakur
Pariket Thakur - avatar
+ 3
You are wrong Runtime Terror see my working example if you want
31st Aug 2021, 10:27 AM
David Ordás
David Ordás - avatar
+ 3
Runtime Terror you are fully entitled. Sure that other people learn a lot with it.
31st Aug 2021, 3:53 PM
David Ordás
David Ordás - avatar
+ 3
David Ordás I and others of the community appreciate your work and your help wherever and whenever available. Same with others of the community.
2nd Sep 2021, 10:41 PM
BroFar
BroFar - avatar
30th Aug 2021, 6:49 AM
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃)
<★Shaurya Chauhan★>(ACTIVE AGAIN✌😇🙃) - avatar