]>
jfr.im git - uguu.git/blob - static/php/includes/settings.inc.php
4 * User configurable settings for Uguu.
8 * PDO connection socket
10 * Database connection to use for communication. Currently, MySQL is the only
11 * DSN prefix supported.
13 * @see http://php.net/manual/en/ref.pdo-mysql.connection.php PHP manual for
15 * @param string UGUU_DB_CONN DSN:host|unix_socket=hostname|path;dbname=database
17 define('UGUU_DB_CONN', 'sqlite:/path/to/db/uguu.sq3');
20 * PDO database login credentials
23 /* @param string UGUU_DB_NAME Database username */
24 define('UGUU_DB_USER', 'NULL');
25 /* @param string UGUU_DB_PASS Database password */
26 define('UGUU_DB_PASS', 'NULL');
29 * @param boolean Log IP of uploads
31 define('LOG_IP', false);
34 * @param boolean anti-dupe
36 define('ANTI_DUPE', false);
39 * @param boolean blacklist DB
40 * ONLY ENABLE THIS IS YOU ARE USING THE LATEST DB SCHEMA!
42 define('BLACKLIST_DB', false);
45 * File system location where to store uploaded files
47 * @param string Path to directory with trailing delimiter
49 define('UGUU_FILES_ROOT', '/path/to/file/');
52 * Maximum number of iterations while generating a new filename
54 * Uguu uses an algorithm to generate random filenames. Sometimes a file may
55 * exist under a randomly generated filename, so we count tries and keep trying.
56 * If this value is exceeded, we give up trying to generate a new filename.
58 * @param int UGUU_FILES_RETRIES Number of attempts to retry
60 define('UGUU_FILES_RETRIES', 15);
63 * The length of generated filename (without file extension)
65 * @param int UGUU_FILES_LENGTH Number of random alphabetical ASCII characters
68 define('UGUU_FILES_LENGTH', 8);
71 * URI to prepend to links for uploaded files
73 * @param string UGUU_URL URI with trailing delimiter
75 define('UGUU_URL', 'https://url.to.subdomain.where.files.will.be.served.com/');
78 * URI for filename generation
80 * @param string characters to be used in generateName()
82 define('ID_CHARSET', 'abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ');
87 define('CONFIG_BLOCKED_EXTENSIONS', serialize(['exe', 'scr', 'com', 'vbs', 'bat', 'cmd', 'htm', 'html', 'jar', 'msi', 'apk', 'phtml', 'svg']));
88 define('CONFIG_BLOCKED_MIME', serialize(['application/msword', 'text/html', 'application/x-dosexec', 'application/java', 'application/java-archive', 'application/x-executable', 'application/x-mach-binary', 'image/svg+xml']));
91 * Whitelist or blacklist mode
92 * @param boolean blacklist (false) | whitelist (true)
94 define('CONFIG_FILTER_MODE', false);
97 * Double dot file extensions.
99 * Uguu keeps the last file extension for the uploaded file. In other words, an
100 * uploaded file with `.tar.gz` extension will be given a random filename which
101 * ends in `.gz` unless configured here to ignore discards for `.tar.gz`.
103 * @param string[] $doubledots Array of double dot file extensions strings
104 * without the first prefixing dot
106 $doubledots = array_map('strrev', [