Gisellameloni / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Create File and use download attribute when saving/exporting #1066

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We should be using the download attribute to make the files available to 
download when saving / exporting.  This would remove the awkwardness in some 
browsers of clicking Save and getting a new tab with the SVG image as a data: 
URL.

  * http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#downloading-resources
  * http://caniuse.com/#search=download

This can just be a link in the menu directly

Original issue reported on code.google.com by jeffschi...@google.com on 9 Mar 2013 at 6:54

GoogleCodeExporter commented 9 years ago
This is supported via ext-server_opensave.js . You can test it at 
http://svg-edit.googlecode.com/svn/trunk/editor/svg-editor.html?extensions=ext-s
erver_opensave.js

It replaces the save button to utilize the download attribute where available, 
or to send back to the user via PHP file where the download attribute is not 
available.

Is that adequate for you?

Original comment by bret...@gmail.com on 8 Apr 2014 at 2:16

GoogleCodeExporter commented 9 years ago
Why not just make it part of the default app (no extension)?

Original comment by jeffschi...@google.com on 8 Apr 2014 at 2:19

GoogleCodeExporter commented 9 years ago
While it would be fine by me if it were to become the default behavior, I think 
we should still have some way to continue opening it as a data URI as that can 
still be useful for grabbing a URL to paste into applications as well as 
getting a preview outside of the editor.

Original comment by bret...@gmail.com on 8 Apr 2014 at 2:35

GoogleCodeExporter commented 9 years ago

Original comment by bret...@gmail.com on 8 Apr 2014 at 5:26