Kwiki::Attachments(3)

πŸ“¦
version 0.21 Β· 2 versions
, in fedora 43

πŸ’– Kwiki::Attachments πŸ’–

okay bestie, so this is Kwiki::Attachments(3) β€” part of the User Contributed Perl Documentation collection, and it's literally the glow-up your wiki page was waiting for 🫢


✨ NAME ✨

Kwiki::Attachments β€” the Kwiki Page Attachments Plugin. that's it, that's the whole name, she's iconic and she knows it πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's the whole vibe check, two steps, no notes:

1. Install Kwiki::Attachments
2. Run 'kwiki -add Kwiki::Attachments'

that's it. that's the ritual. periodt 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

🌈 General

Kwiki::Attachments hands your Kwiki wiki the ability to upload, store and manage file attachments on any page. any page!! the whole place. main character energy fr fr πŸ‘‘

so by default β€” and this is the part that's giving magic ✨ β€” if you have an image creation module installed like Imager or Image::Magick, then a thumbnail gets created for every supported image file type you upload. every single one. no cap.

those thumbnails show up on the attachments page, and they can also pop off on wiki pages via the wafl directives we're about to spill in the next paragraph, iykyk.

okay now listen closely because this is important πŸ’–: the thumbnail files have thumb_ prepended to the original filename, and they are not displayed separately in the attachment page or widget. and for this reason, you cannot upload files beginning with thumb_. that's just the rules, bestie, it's the law of the land 😭

πŸ’« WAFL

This module provides 3 wafl tags which can be used to link to or display attachments in a Kwiki page. three!! a little trio πŸŽ€

  • {file:[page/]filename} β€” creates a link to attachment filename πŸ”—
  • {img:[page/]filename} β€” displays attachment filename πŸ–ΌοΈ
  • {thumb:[page/]filename} β€” displays the thumbnail for attachment filename 🌸

⭐ Configuration Options ⭐

your config file lives right here, mwah:

[kwiki_base_dir]/config/attachments.yaml

and inside she's got three settings, let's get into it:

  • attachments_skip: [regular_expression] β€” Kwiki::Attachments may be configured to reject the upload of files with names matched by the given regular expression. by default, it's set to reject files beginning with thumb_ or . and those ending with ~ or .bak. so like, the gremlins get filtered out πŸ™ˆ
  • make_thumbnails: [on|off] β€” this flag controls whether thumbnails are created from uploaded image files. it is set to 'on' by default. slay πŸ’…
  • im_override: [on|off] β€” okay so if Imager.pm and Image::Magick.pm are both available, Kwiki::Attachments uses Imager, unless im_override is set to 'on'. this parameter has no effect if only one of the two image manipulation modules is installed. it is set to 'off' by default. lowkey the most dramatic option in the whole file tbh πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

Sue Spence <sue_cpan@pennine.com>

This module is based almost entirely on work by Eric Lowry <eric@clubyo.com> and Brian Ingerson <INGY@cpan.org> β€” shoutout to the OGs, we love a collaborative origin story 🫢✨


Copyright (c) 2005. Sue Spence. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

legal text but make it cute, we love to see it πŸŽ€

πŸ’€ POD ERRORS πŸ’€

Hey! The above document had some coding errors, which are explained below:

Around line 355:

You forgot a '=back' before '=head1'

not me exposing the author's pod crimes 😭 it's fine, it's fine, we still stan. the vibe was immaculate even if the =back ghosted us πŸ™ˆ


okay that's the whole page bestie!! this was rendered from the perl v5.42.0 manual set, dated 2025-07-25, filed under Kwiki::Attachments(3) β€” go forth and attach ur little files, you absolute legend πŸŒˆπŸ’–βœ¨

πŸ“¦ where this page comes from