1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>attachment</title>
<link rel="stylesheet" href="../../../bootstrap/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../../../bootstrap/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="../../../local.css" type="text/css" />
<meta name="robots" content="noindex, follow" />
<style type="text/css">
@media (max-width: 979px) {
.navbar-fixed-top {
position: fixed;
margin-left: 0px;
margin-right: 0px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="row-fluid">
<div class="span12">
<h1></h1>
<ul class="breadcrumb">
<li><a href="../../../">Cache Saravento</a> <span class="divider">/</span> </li>
<li><a href="../../">ikiwiki</a> <span class="divider">/</span> </li>
<li><a href="../">pagespec</a> <span class="divider">/</span> </li>
<li>attachment</li>
<li><span class="divider">|</span> <a href="../../../todo">Tarefas</a></li>
<li><span class="divider">|</span> <a href="https://git.sarava.org/?p=cache.git;a=history;f=ikiwiki/pagespec/attachment.mdwn">Histórico</a></li>
<li><span class="divider">|</span> <a href="https://git.sarava.org/?p=cache.git;a=atom">Feed</a></li>
</ul>
</div>
</div>
<div class="page row-fluid">
<div>
<div class="pageheader">
<div class="header">
<h1>
attachment
</h1>
</div>
</div>
<div id="pagebody">
<div id="content">
<p class="pagedate">
<strong>Posted <span class="date">Sex 23 Abr 2010 18:36:07 BRT</span></strong>
</p>
<p>This wiki has attachments <strong>disabled</strong>.</p>
<p>If attachments are enabled, the wiki admin can control what types of
attachments will be accepted, via the <code>allowed_attachments</code>
configuration setting.</p>
<p>For example, to limit most users to uploading small images, and nothing else,
while allowing larger mp3 files to be uploaded by joey into a specific
directory, and check all attachments for viruses, something like this could be
used:</p>
<pre><code>virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (mimetype(image/*) and maxsize(50kb)))
</code></pre>
<p>The regular <a href="../">PageSpec</a> syntax is expanded with the following
additional tests:</p>
<ul>
<li><p>"<code>maxsize(size)</code>" - tests whether the attachment is no larger than the
specified size. The size defaults to being in bytes, but "kb", "mb", "gb"
etc can be used to specify the units.</p></li>
<li><p>"<code>minsize(size)</code>" - tests whether the attachment is no smaller than the
specified size.</p></li>
<li><p>"<code>ispage()</code>" - tests whether the attachment will be treated by ikiwiki as a
wiki page. (Ie, if it has an extension of ".mdwn", or of any other enabled
page format).</p>
<p>So, if you don't want to allow wiki pages to be uploaded as attachments,
use <code>!ispage()</code> ; if you only want to allow wiki pages to be uploaded
as attachments, use <code>ispage()</code>.</p></li>
<li><p>"<code>mimetype(foo/bar)</code>" - checks the MIME type of the attachment. You can
include a glob in the type, for example <code>mimetype(image/*)</code>.</p></li>
<li><p>"<code>virusfree()</code>" - checks the attachment with an antiviral program.</p></li>
</ul>
</div>
<hr />
</div>
<div id="footer" class="pagefooter">
<div id="pageinfo">
<!--<div class="pagedate">
Last edited <span class="date">Sex 23 Abr 2010 18:36:07 BRT</span>
</div> -->
</div>
<!-- from Cache Saravento -->
</div>
</div>
<div class="span4">
</div>
</div>
</div>
</body>
</html>
|