Reputation: 829
I made some png
using canvas.toDataURL()
.
I want to save it to folder that have some png
using download dialog.
But I don't know how to make folder and to use download dialog.
Please advise me.
Upvotes: 1
Views: 994
Reputation: 9299
Pretty sure there's no way to create an arbitrary folder on your client's computer. It seems to me like that would be a massive security problem.
If you want to create a link to download a file, just use the download attribute on your a tag.
<a href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4
c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABoSU
RBVDhPvYxLFoAwCAN7/0sjJRFCW135nIWSX4d1xgaDm6b32FlMinjr0Aaa1
gDHE21QIsAN1MFR2pniw4ED2Rrv/D+g3sh0fvMCUWgw0EEKEDVCSwo10HhB
01bSABwc/gWUAK3E7AJgQR/9VKyAfgAAAABJRU5ErkJggg=="
download="myimage.png">Download this image</a>.
Upvotes: 1