exupero / saveSvgAsPng

Save SVGs as PNGs from the browser.
MIT License
1.09k stars 362 forks source link

some svgs not working on mobile safari #246

Open beanmatt opened 4 years ago

beanmatt commented 4 years ago

I've got this working so that SVGs are downloading as PNGs. Works great on desktop browsers. On mobile Safari (iOS 13.4.1), all of them are working except for one. On the one that doesn't work, it tries to save it as filename.png.txt and adds ".txt" onto the filename. It only does this on mobile, and only on this one SVG.

I initially thought it might be because it's a more complex SVG (1.1MB and the others are around 100KB), but I modified the SVG to get it down to around 10KB and tried it and it did the exact same thing.

Any ideas why mobile Safari adds .txt to this one particular SVG while the others work great? IMG_0213 IMG_0214