summaryrefslogtreecommitdiff
path: root/doc/plugins/attachment.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-02 17:30:00 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-02 17:30:00 -0400
commitb9418274203916d1bea75c9da581a6a1dba0a30e (patch)
tree04081902dbff677920f3d80a7192a793e13b00f5 /doc/plugins/attachment.mdwn
parentf8e33430d85bd30f37f723c0b9ed6ef57e140603 (diff)
add mimetype checking
Diffstat (limited to 'doc/plugins/attachment.mdwn')
-rw-r--r--doc/plugins/attachment.mdwn8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/plugins/attachment.mdwn b/doc/plugins/attachment.mdwn
index 184f5b5df..01816cd5c 100644
--- a/doc/plugins/attachment.mdwn
+++ b/doc/plugins/attachment.mdwn
@@ -29,7 +29,7 @@ For example, to limit arbitrary files to 50 kilobytes, but allow
larger mp3 files to be uploaded by joey, a test like this could be
used:
- (user(joey) and *.mp3 and maxsize(15mb)) or (!ispage() and maxsize(50kb))
+ (user(joey) and *.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (!ispage() and maxsize(50kb))
The following additional tests are available:
@@ -62,3 +62,9 @@ The following additional tests are available:
Tests whether the attacment is being uploaded from the specified IP
address.
+
+* mimetype(foo/bar)
+
+ If the [[cpan File::MimeInfo::Magic]] perl module is installed, this
+ allows checking the mime type of the attachment. You can include a glob
+ in the type, for example `mimetype(image/*)`.