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.
+ 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😁😀
+ 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();
+ 5
Tapabrata Banerjee [Inactive] [NO DM] maybe this will help..
https://morioh.com/p/30ab2e8c4b57
+ 5
Prashanth Kumar Having good skills does not make you superior.
+ 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
+ 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!
+ 5
Prashanth Kumar OK 🙂, friend
+ 4
<★Shaurya Chauhan★>(Inspiration will draw you), this isn't a download
+ 4
<★Shaurya Chauhan★>(Inspiration will draw you) Don't worry 🤗
+ 4
Tapabrata Banerjee [Inactive] [NO DM] I forgot I made this some time back
https://code.sololearn.com/Wne06iv54u10/?ref=app
+ 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);
....
+ 4
I'm not fighting. I post solutions and arguments related with question.
The End. Unsusbcribed from this Q&A
+ 3
Tapabrata Banerjee [Inactive] [NO DM] Wixonic OK my bad I didn't understand 😕
+ 3
Tapabrata Banerjee [Inactive] [NO DM] the code i gave u will work on PC have u tried ??
+ 3
You are wrong Runtime Terror see my working example if you want
+ 3
Runtime Terror you are fully entitled. Sure that other people learn a lot with it.
+ 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.
+ 2
Tapabrata Banerjee [Inactive] [NO DM]
Maybe this will help
Made by I am rochie
https://code.sololearn.com/WgNdisUgiyu1/?ref=app