If making different namespaces per filetype wasn't
feasible, what about making [[File:]] better so it
automatically returns the best way to use the media--<img> tag for images,
video/audio tags (or fallbacks)
as appropriate. That way if a file is changed (ie ogg
over png) it still displays properly.
This is all dependent on stripping extensions from
uploads, though.
-Chad
On Jul 20, 2009 6:15 PM, "Aryeh Gregor"
<Simetrical+wikilist(a)gmail.com<Simetrical%2Bwikilist(a)gmail.com>>
wrote:
On Mon, Jul 20, 2009 at 6:20 AM, Dmitriy Sintsov<questpc(a)rambler.ru> wrote:
> I am not sure that the...
Maybe they don't retrieve the page in the first place, because they
don't want to waste bandwidth and processing time getting images. It
would be rather a waste to send dozens or hundreds of HEAD requests on
every Flickr page (or whatever) just to make sure that all those
things ending in a suffix universally accepted to designate images
really *are* images.
On Mon, Jul 20, 2009 at 9:45 AM, Nikola Smolenski<smolensk(a)eunet.yu> wrote:
> It's a necessary evil...
Well, that would make no difference if you actually downloaded the
content, or the first handful of bytes. It's easy to *very* reliably
distinguish binary image data from HTML if you get to look at the
first several bytes of the file.
Anyway, I think the "right" way to do this would be to omit the suffix
from the page name entirely, treating the format as an implementation
detail. That way you could, for instance, upload an SVG over a PNG or
a PNG over a JPEG, and have all users be automatically updated without
manually changing the references. This does get a little confusing
when you consider totally different types of media, though, like audio
or video or PDF or whatnot. If NS_FILE (NS_IMAGE) weren't hardcoded
in thirty million places both in code and templates, I might suggest
different namespaces for different media types instead of one unified
File: namespace, but that seems impractical at this point.
_______________________________________________ Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia....