[Mediawiki-l] enable downloads/dinamic logo/installing my miki

Rowan Collins rowan.collins at gmail.com
Tue Jun 21 00:59:39 UTC 2005


On 19/06/05, Jordi Domingo <jordidr at gmail.com> wrote:
> I get a link to download the file?. I mean, if uload was thought to
> images, then putting the image you could download it wih right button
> of the mouse, but it is a uplaoded text file, that I have to
> download....there's any function to do this, or simply I remade one of
> the navigation links to point the file? (rough method, I suppose; but
> if there's a specific function to download files as there is one to
> upload file, would be better...)

The way to do what I think you mean in wikitext is using the
[[Media:Filename]] syntax (refer to the file itself, not the
description). Internally, this is a call to Skin::makeMediaLinkObj()
(in v1.5 this has moved to the new "Linker" class)

[Ignore this paragraph if you knew it already:] Note that whether the
browser views or saves a text file is down to the configuration of a)
the browser, and b) your server. For instance, a file sent with a
content-type of "text/plain" will generally be displayed directly in
the browser window. You can more-or-less force a save by getting your
server to make up some other content-type (e.g. "text/x-something");
or, I believe some browsers respond to an extra header saying
"Content-Disposition:attachment" - originally defined for e-mail
messages in http://www.ietf.org/rfc/rfc2183.txt

-- 
Rowan Collins BSc
[IMSoP]



More information about the MediaWiki-l mailing list