data urls not working in firefox and chrome
Closed this issue · 9 comments
data urls seem to be not working anymore in firefox and chrome.
They still work only in safari. So when you want to download a c3 chart, you get nothing.
I think it would be useful to be able to download the svg file
I noticed that. Seems to be the same as piskelapp/piskel#729
That said, considering the size limitations imposed by some browsers on data URIs it might be wise to keep them on the server and download them the conventional way. That also allows users to download the result using curl
, etc. I'll have a look.
Pushed 6eed5f4, which keeps the data on the server and uses a normal URL.
Hi Jan,
did you already update the swish server? It doesn't seem to allow downloads, see e.g.
https://swish.swi-prolog.org/example/rendering.swinb
for the result of the first query (the table)
or
https://swish.swi-prolog.org/example/render_c3.swinb
? Both work fine. Not very useful though. You get a very ugly CSV with a single record holding a complicated Prolog term. That is how it should be though. Anyway, the patch is for r_download/0,1
and does not affect CSV downloading. Tried on latest FF.
I'm speaking about the button that appears by hovering on the rendering, the one besides "List of terms as a table" or "As C3 chart"
Fixed with df5ebe7. Not really pretty, but I doubt there is a real solution at this moment. The SVG is generated by the browser. The download
attribute demands same origin, but both data
and Blob
URLs are considered CORS. The only smooth way seems to be to upload the SVG to the server and then download it again ... That doesn't pass my aesthetic requirements ...
The good news is that you can now select the destination file.
P.s. Updated public SWISH. Might need a SHIFT-reload.
Thanks, it works fine now.
Now SLDNF trees can be downloaded again!
http://cplint.eu/example/member.swinb