Method-Draw
Method-Draw copied to clipboard
Image Save - SVG
When using image save... a popup windows displays the SVG... I have to use save SVG only to save file to my device. Is it possible to make adjustments in code to save to device storage the same as open SVG popup?
If I recall correctly there's a way of generating a download from javascript but it only works in Chrome, I'll address this issue.
@duopixel
I guess we can make this work for Safari as well.
- It involves creating a
<a>
tag and attaching the file blob on thesrc
, then having the user click on it to trigger the download.
The issue I see here is mostly the UI implementation of the above and if it's really worth it to go that far. I'd happily create a PR for this if you could describe to me a workflow that the user would follow.
This looks like a good match...
https://github.com/eligrey/FileSaver.js/blob/master/FileSaver.js
I'll give it a try in a while
Used it before,
Takes care of of Firefox/Chrome/IE like a charm.
Safari doesn't play well with it as mentioned here. Since Webkit is the engine behind any browser on iOS, it won't work there as well.
That's where the trick above comes in handy though.
thanks for the notice @nicholaswmin, I've implemented the download thingy for all browsers except Safari. I'll tackle Safari later.
:+1: