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@gmail.comSimetrical%2Bwikilist@gmail.com> wrote:
On Mon, Jul 20, 2009 at 6:20 AM, Dmitriy Sintsovquestpc@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 Smolenskismolensk@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@lists.wikimedia....
On Mon, Jul 20, 2009 at 10:28 PM, Chadinnocentkiller@gmail.com wrote:
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.
That would work, it would just be slightly confusing. Consider the following wikimarkup:
[[File:Anthony Kennedy]]
Is that a picture, a video, a sound clip? Maybe even a PDF of a book by that name? It's not obvious. Of course, hitting preview would immediately tell you, so I think the confusion would be tolerable. But it would be a little weird.
wikitech-l@lists.wikimedia.org