9
I have a link, and by clicking on this link he downloads an image. So far so good, plus when I access from some mobile device I can’t download this file, someone has some idea or solution to solve this?
HTML:
<a href="http://mlb-s2-p.mlstatic.com/ipad-mini-apple-16gb-wi-fi-100-original-pronta-entrega-16713-MLB20125338106_072014-F.jpg" download>
Clique para baixar a imagem
</a>
JSFIDDLE:
Dude, which browsers have you tested? Some browsers offer more HTML5 support than others!
– Gabriel Tadra Mainginski
Example: Safari (by iPad), Internet Explorer (Windows Phone), Chrome (iPad and Android).
– Danilo Pádua
Precisely Safari and Internet Explorer do not support the download attribute. Newer versions of Chrome and Opera support.
– Ailton Andrade de Oliveira
Right. So I tested for Chrome (iPad) and it didn’t work, so I see the download tag is supported by Chrome
– Danilo Pádua
look here: http://developer.android.com/intl/pt-br/training/basics/data-storage/files.html
– Ivan Ferrer
my Android cell phone low file in a good...?
– Ivan Ferrer
I don’t know what it’s like on Android and Windows Phone, but on iOS I think you just can’t download.
– bfavaretto
@Danilo doesn’t have something with iOS to test, but looking at http:/mobilehtml5.org/ it looks like Chrome’s grip on iOS HTML 5 is the same as Safari’s. In this case, on iOS, perhaps the only option is Opera. Depending on who your target audience is, you can try using a base-64 coded href (more or less as done on: http://stackoverflow.com/a/26721964/1156498 ) using a suitable MIME type for your image (I would try application/octet-stream).
– Ailton Andrade de Oliveira