Unify pages and attachments to mimetype items

/!\ For discussion please use the discussion subpage and comment there. Please be constructive and make better suggestions about how to do it.

Currently (and likely up to moin 1.9), pages and attachments are handled very differently. If we store a MimeType for items we store, we could unify storage of page files, user account files and uploaded files.

Work on this kind of storage was done in SOC 2008.

Terminology

For a better understanding, let's use this terminology:

mimetype text/x-moin-wiki

content of the kind of markup you usually use with moin (aka #format wiki)

raw
like in "raw action", "raw content", "raw url" is related to verbatim file content as stored by the wiki storage backend
  • for a usual wiki page, this is the text you see in the text editor, type text/x-moin-wiki
  • for a pdf file, this would be direct "binary" content of type application/pdf (like stored in .pdf files)
  • there is no theme output / no user interface at the raw url, just http headers + raw content
render
like in "render an item", "rendered view", "render url". "render/show action" means to show the wiki user interface frame (generated by the theme) and some kind of display of the item in the content area.
  • For mimetypes we have code for showing them in a browser you likely will see the item data on screen (a rendered wiki page, a rendered (scaled) image, a rendered highlighted piece of code).
  • For mimetypes we don't have such code, you will likely see just some metadata and maybe some buttons for upload/download.
highlight
for some text/* mimetypes like programming source code, diffs, irc logs, etc. we can use a highlighting renderer - this could be the fallback of the (non-highlighting) rendering for cases we can't render in another way than highlighting.
item
generic datatype that is able to store revisioned metadata and data - there are no pages and no attachments any more, just items. The mimetype metadata tells what it is.

Features

Linking

Transclusion

Download

... will be offered by links in the theme (on the page shown by "show" action) and trigger download of currently shown item revision.

For download there could be 2 links:

Upload

... will be offered by a link in the theme (on the page shown by "show" action).

It will show a form with those fields:

A upload will create a new item revision, of course.

Edit

... will be offered by a link in the theme (on the page shown by "show" action) for any mimetype we can support with a online editor (text/*, twikidraw, others?).

Editor could maybe just POST to ?action=upload to save the result.

GUI editor needs specialcasing as the converter needs to get called. Additional convertfrom=text/html convertto=text/wiki parameters to upload?

MoinMoin: UnifyPagesAndAttachments (last edited 2008-10-11 23:36:14 by ThomasWaldmann)