[Moin-user] Changing default behavior on downloads.

Tim Bird tim.bird at am.sony.com
Tue Sep 30 15:01:05 EDT 2008

Thomas Waldmann wrote:
>> Maybe there should be *three* options - ?render=raw, ?render=manager
>> and ?render=formatted,
> Ugh, that would make linking even more complicated than it already is.
> |-)
>> with the default varying by mime type,
> As I said, if link generation depends on target mimetype, it might get
> very slow as there can be many links on a page...

At the risk of pouring more fuel on the fire, I think the
basic problem is in having MoinMoin manage the presentation to
the browser of the "raw" attachments at all.

The reason for all the weird behavior is simply that MoinMoin
is trying to do some portion of the work (e.g. mime-typing)
that the web server and/or browser normally do, and messing
it up.  A case in point is that when I try to do "save-as"
by right clicking from my browser, my browser uses the page
name, instead of the name of the attached file (because that's
buried in the params in the URL, instead of in the path where
most browsers expect the downloaded file name to be).  This
is annoying as all get-out.  Instead of trying to manage
the mime-typing, MoinMoin could just use standard URLs,
and let the server and browser "do their thing".

IMHO, it would be nice if non-page items (e.g. files) were
accessible from the the web server via direct links
(NOT via the MoinMoin CGI script).  At least for the current
version of some item.  This allows the web server and browser
to handle regular download of the items in the standard
fashion.  If MoinMoin wants to build a fancy page for handling
meta-info (history, revisions, comments, etc.), it can do that
through a link through itself.

That is, the "raw" url for some item should not be:
http://server.com/moin.cgi/PageName?<some weird args here>?item=foo.pdf
but just:

The big problem, of course, is that the file space is segmented
by page name.  If the attached files were in one directory, this
becomes trivial to implement (at the cost of possible name
space collisions - although I'll note here that even wikipedia,
with it's enormous size, uses a flat uploaded file namespace).
Even if you present the documents under page names,
then you could still put them out somewhere where the web server
can serve them directly, instead of having MoinMoin get in the way.
 -- Tim

Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America

More information about the Moin-user mailing list