· 5 years ago · Jun 23, 2020, 06:58 PM
1module.exports = {
2
3 /*
4 If set to true the user will need to specify the auto-generated token
5 on each API call, meaning random strangers wont be able to use the service
6 unless they have the token lolisafe provides you with.
7 If it's set to false, then upload will be public for anyone to use.
8 */
9 private: true,
10
11 // If true, users will be able to create accounts and access their uploaded files
12 enableUserAccounts: true,
13
14 /*
15 Here you can decide if you want lolisafe to serve the files or if you prefer doing so via nginx.
16 The main difference between the two is the ease of use and the chance of analytics in the future.
17 If you set it to `true`, the uploaded files will be located after the host like:
18 https://lolisafe.moe/yourFile.jpg
19
20 If you set it to `false`, you need to set nginx to directly serve whatever folder it is you are serving your
21 downloads in. This also gives you the ability to serve them, for example, like this:
22 https://files.lolisafe.moe/yourFile.jpg
23
24 Both cases require you to type the domain where the files will be served on the `domain` key below.
25 Which one you use is ultimately up to you.
26 */
27 serveFilesWithNode: false,
28 domain: 'https://i-own.prismax.games',
29
30 // Port on which to run the server
31 port: 9999,
32
33 // Pages to process for the frontend
34 pages: ['home', 'auth', 'dashboard', 'faq'],
35
36 // Add file extensions here which should be blocked
37 blockedExtensions: [
38 '.jar',
39 '.exe',
40 '.exec',
41 '.msi',
42 '.com',
43 '.bat',
44 '.cmd',
45 '.nt',
46 '.scr',
47 '.ps1',
48 '.psm1',
49 '.sh',
50 '.bash',
51 '.bsh',
52 '.csh',
53 '.bash_profile',
54 '.bashrc',
55 '.profile'
56 ],
57
58 // Uploads config
59 uploads: {
60
61 // Folder where images should be stored
62 folder: 'uploads',
63
64 /*
65 Max file size allowed. Needs to be in MB
66 Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
67 */
68 maxSize: '512MB',
69
70 // The length of the random generated name for the uploaded files
71 fileLength: 32,
72
73 /*
74 This option will limit how many times it will try to generate random names
75 for uploaded files. If this value is higher than 1, it will help in cases
76 where files with the same name already exists (higher chance with shorter file name length).
77 */
78 maxTries: 1,
79
80 /*
81 NOTE: Thumbnails are only for the admin panel and they require you
82 to install a separate binary called ffmpeg (https://ffmpeg.org/) for video files
83 */
84 generateThumbnails: false,
85
86 /*
87 Allows users to download a .zip file of all files in an album.
88 The file is generated when the user clicks the download button in the view
89 and is re-used if the album has not changed between download requests
90 */
91 generateZips: true
92 },
93
94 // Folder where to store logs
95 logsFolder: 'logs',
96
97 // The following values shouldn't be touched
98 database: {
99 client: 'sqlite3',
100 connection: { filename: './database/db' },
101 useNullAsDefault: true
102 }
103}