Update +pages.svelte allow downloading current canvas
Adds the 'Download' control to drawingboard.js.
I have not tested this, assuming this is what's being used?
https://github.com/Leimi/drawingboard.js#included-controls
yes, that is correct drawingboard.js is being used. However, the drawingboard.js creates a download file with a name that does not have file extensions. Therefore, the downloaded file is not recognized as image on some operating systems. I will just implement it since it is just canvas
added the download btn https://huggingface.co/spaces/huggingface/diffuse-the-rest/commit/300541659cb6f05e766f938b39a811727f63c221
please let me know if you have any questions ๐
Oh nice one!
I thought there might have been a reason why that drawingcanvas.js option wasn't enabled, either it didn't work or you didn't want this being used as more than a demo.
Who owns the server that actually does the work?
Download button works well.
I was using the tampermonkey extension to add my own download button in pretty much the same way you implemented, I was going to share the code with you but you're already done!
Who owns the server that actually does the work?
Obviously, huggingface ๐ค
Cheers yeah I think I misunderstood what was going on till I looked at the source, that's awfully generous.
I can imagine lots of uses for this tech and think it's only going to get more popular.