[Pmwiki-users] More on attachments

Patrick R. Michaud pmichaud at sci.tamucc.edu
Tue Nov 19 00:20:08 CST 2002

First, a big thank you to all who have contributed to the file
upload discussion.  I'll attempt to summarize where I think things
stand thus far.

I think everyone has come to agreement that putting all of the uploaded 
files in a big centralized pool is a bad idea.  Almost everyone who has 
commented has noted a need for per-page or per-group organization of 
uploaded files or else things get too cluttered.  So, I'll throw out the 
central-pool argument, leaving just "per-page" or "per-group" attachments 
as possibilities.  And, given that this is the case, I'm going to start 
referring to uploaded files by the generic term "attachments" regardless 
of whether they end up being attached to pages or groups.

Continuing from this, I'll note that I don't think there is any fundamental
difference between per-page and per-group attachments except in two key areas:
    a.  The way that listings of available attachments are displayed
    b.  The markup used within a wiki page to refer to an attachment
The markup issue (b) seems pretty trivial to me--it ought to be 
straightforward to develop markup that can refer to attachments of other
pages and/or groups.  That just leaves the issue of listing available
attachments (a).  Everyone talks about the need for having a list of
available attachments--nobody has quite said where such a list ought to
be displayed, what it should contain, or what it should look like.  I 
think that answering that question will go a long way towards resolving 
the "page" versus "group" attachment concept.

In response to one of John Rankin's comments:  I think it's possible to
have both group and page attachments, perhaps implemented by convention
through a "GroupAttachments" page.

Scott Duff has suggested some sort of context-sensitive model for the 
markup to select an attachment from a page, group, or site depending
on the page location--but I need a lot more clarification on what he 
has in mind before I can explain it.

Overall, I think the concern about having redundant file uploads is really a 
non-issue.  Someone who wants to put a banner graphic on every page in
a group should be using the GroupHeader page or an [[include:.*]]
to do it--and in this case it makes sense for a single graphic image to be
attached to the GroupHeader page or the included page and referenced from
there--not placed in every page in the group.  I grant that if someone 
knows an attachment is already available then they're more likely to 
re-use it, but that just returns us to the attachment listing issue
given above.  

A comment about the markup--I almost certainly will *not* be
using double-brackets (as in [[$upload:foo.jpg]]) to indicate uploaded 
files, if only because the attachment markup itself will likely need 
to be able to be embedded within double brackets.  I don't want to
end up with something like [[[[$upload:foo.jpg]] Click here for attachment]]
in the wiki markup!  So, markup such as Attach:name.jpg or 
Attach:PageName/name.jpg or Attach:GroupName/name.jpg is how things will 
likely proceed, although I'm still very open to other suggestions.

Finally, I going to assume that in general attachments can be of any
file type, with the caveat that site administrators will have the
ability to restrict uploading of attachments by size, type, and passwords.
I really don't see a point in hard-coding file type restrictions into
PmWiki itself.

So, anyone want to take a stab at where attachment listings should be
displayed and what they should look like?  Remember to keep it relatively
simple and straightforward if possible!


More information about the pmwiki-users mailing list