[pmwiki-users] Attachment size

Patrick R. Michaud pmichaud at pobox.com
Thu Aug 3 10:55:29 CDT 2006

On Thu, Aug 03, 2006 at 11:50:00AM -0400, Neil Herber wrote:
> At 2006-08-03  10:32 AM -0500, Patrick R. Michaud is rumored to have said:
> >> > > Is there any way of displaying the file-size of an uploaded file? 
> >(That
> >> > > is, one uploaded with "Attach:").
> >
> >At the moment, no.  It really needs a good markup for doing this.
> >One approach would be to define a custom "Attach:" markup that also
> >determines and displays the filesize.
> I would definitely use such markup. Currently I either manually 
> insert the size or I use the (:attachlist:) markup which (of course) 
> shows too many files.
> How about:
> Attachdetails:
> Attachinfo:
> Attachlong:
> Attachplus:
> Attachfs:   (fs = file size)

Oh!  Here's a thought -- what if we overload the "alt-text" field
of links to allow the specification?  So:

    Attach:file.txt               -- normal
    Attach:file.txt"size"         -- display with file size
    Attach:file.txt"date"         -- display with last updated date
    Attach:file.txt"type"         -- display with type

Currently the "..." is used to provide alt-text for images, but
isn't really used for attachments, so it might make sense to re-use it
for that here.


More information about the pmwiki-users mailing list