/
uploads.xml
161 lines (158 loc) · 5.49 KB
/
uploads.xml
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
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Admin_Guide.ent">
]>
<section id="admin.config.uploads">
<title>File Upload</title>
<para>MantisBT allows users to upload file attachments and
associate them with bugs as well as projects. Bug attachments /
project documents can be uploaded to the webserver or database.
When bugs are uploaded to the webserver they are
uploaded to the path that is configured in the project
properties. In case of problems getting the file upload feature to
work, check the following resources:
<ulink url="http://www.php.net/manual/en/features.file-upload.php">PHP
Manual
</ulink>
.
</para>
<variablelist>
<varlistentry>
<term>$g_allow_file_upload</term>
<listitem>
<para>Whether to allow/disallow uploading of attachments. Default
value is ON.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_file_upload_method</term>
<listitem>
<para>Specify the location for uploading attachments.
In case of DISK methods you need to provide the
webserver with write access rights to the configured upload path
(configured in the project) and temporary upload path (used by
PHP).
</para>
<para>Values: DISK or DATABASE
</para>
<para>Default: DATABASE
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_dropzone_enabled</term>
<listitem>
<para>Whether to enable/disable drag and drop zone for uploading of attachments.
Default value is ON.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_file_upload_max_num</term>
<listitem>
<para>Maximum number of files that can be uploaded simultaneously.
Default value is 10.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_max_file_size</term>
<listitem>
<para>Maximum file size that can be uploaded. Default value is
about 5MB.
The maximum size is also affected by the PHP options
post_max_size (default 8MB), upload_max_filesize (default 2MB)
and memory_limit (default 128MB) specified in php.ini.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_allowed_files</term>
<listitem>
<para>Files that are allowed. Separate items by commas. eg.
"zip,bmp,gif,jpg,txt" If $g_allowed_files is filled in NO other
file types will be allowed. If empty it will assume any files are
accepted that pass the $g_disallowed_files list.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_disallowed_files</term>
<listitem>
<para>Files that are not allowed. Separate items by commas. eg.
"php,php3,phtml,html,class,java,exe,pl" $g_disallowed_files takes
precedence over $g_allowed_files.
It is recommended to disable all extensions that can be executed by
your server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_preview_attachments_inline_max_size</term>
<listitem>
<para>This limit applies to previewing of image / text attachments.
If the attachment size is smaller than the specified value, the attachment
is previewed with the issue details. The previewing can be disabled
by setting this configuration to 0. The default value is 256 * 1024 (256KB).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_preview_text_extensions</term>
<listitem>
<para>An array of file extensions (not including dots) for text files that can be previewed inline.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_preview_image_extensions</term>
<listitem>
<para>An array of file extensions (not including dots) for image files that can be previewed inline.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_preview_audio_extensions</term>
<listitem>
<para>An array of file extensions (not including dots) for audio files that can be played inline.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_fileinfo_magic_db_file</term>
<listitem>
<para>Specify the filename of the magic database file.
This is used by PHP 5.3.0 (or earlier versions with the
fileinfo PECL extension) to guess what the MIME type of a
file is. Usually it is safe to leave this setting as the
default (blank) as PHP is usually able to find this file
by itself.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_file_download_xsendfile_enabled</term>
<listitem>
<para>Enable support for sending files to users via a more efficient
X-Sendfile method. HTTP server software supporting this technique
includes Lighttpd, Cherokee, Apache with mod_xsendfile and nginx.
You may need to set the proceeding file_download_xsendfile_header_name
option to suit the server you are using.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_file_download_xsendfile_header_name</term>
<listitem>
<para>The name of the X-Sendfile header to use. Each server tends to
implement this functionality in a slightly different way and thus
the naming conventions for the header differ between each server.
Lighttpd from v1.5, Apache with mod_xsendfile and Cherokee web
servers use X-Sendfile. nginx uses X-Accel-Redirect and Lighttpd
v1.4 uses X-LIGHTTPD-send-file.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>