Update +pages.svelte allow downloading current canvas

#28
by artsyparty - opened

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

Huggingface Projects org

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

Huggingface Projects org

added the download btn https://huggingface.co/spaces/huggingface/diffuse-the-rest/commit/300541659cb6f05e766f938b39a811727f63c221

please let me know if you have any questions ๐Ÿ˜ƒ

mishig changed pull request status to closed

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!

Huggingface Projects org

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.

Sign up or log in to comment