On 6/21/05, Rowan Collins <rowan.collins(a)gmail.com> wrote:
On 19/06/05, Jordi Domingo <jordidr(a)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)
Yes, it seems what I need. However, looking the code in skin.php, it
seems it refers to the originally uploaded file; and I rename/move the
file (necessary for avoiding conflicts); I'll try it, or maybe
modifying this function if it doesn't work (being not exactly the
originally uplaoded file).
[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
Mmm, it's true, I work with PO files (*.po), but after all internally
are text/plain. I suppose I'll have to put a tooltip or something
"press right button", as I can't suppose any specific browser for my
aplication (could be konqueror, mozilla, firefox, etc...). I'll try to
conf the server, as you say.
--
Rowan Collins BSc
[IMSoP]
Lot of thanks!!!
Jordi