- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 14 Jul 2011 14:44:15 -0700
On Thu, Jul 14, 2011 at 1:53 PM, Glenn Maynard <glenn at zewt.org> wrote: > That reminds me of something download=filename can't do: assign a filename > while leaving it inline, so "save as" and other operations can have a > specified filename. ?That would require two separate properties. ?One case > I've come across is <img>, where I want to display an image, but provide a > different filename for save-as. ?Separating the filename would allow this to > be applied generically both links and inline resources: <img > src=f1d2d2f924e986ac86fdf7b36c94bcdf32beec15.jpg filename=picture.jpg>. Optimizing for the user choosing to right-click=>Save seems like a much more niche case than linking to a file that should be downloaded. Plus, you could address it by just wrapping the <img> in an <a>: <a href=uglyurl.jpg download=prettyurl.jpg><img src=uglyurl.jpg></a> Alternately, there's nothing saying that @download can't be useful on <img> directly. It would still be embedded normally, but @download would set the download filename the same way that it does on <a>. (It seems more obvious to me that the download filename is in @download than @filename - the latter seems likely to confused people into thinking that it's involved somehow in linking to the image, or that you're required to set the filename on all images). ~TJ
Received on Thursday, 14 July 2011 14:44:15 UTC