2017-01-13 07:48:18 +00:00
|
|
|
module.exports = {
|
|
|
|
|
2018-01-23 20:06:30 +00:00
|
|
|
/*
|
|
|
|
If set to true the user will need to specify the auto-generated token
|
2018-03-24 19:47:41 +00:00
|
|
|
on each API call, meaning random strangers won't be able to use the service
|
2018-04-04 16:47:20 +00:00
|
|
|
unless they have the token lolisafe provides you with.
|
2018-01-23 20:06:30 +00:00
|
|
|
If it's set to false, then upload will be public for anyone to use.
|
|
|
|
*/
|
|
|
|
private: true,
|
|
|
|
|
|
|
|
// If true, users will be able to create accounts and access their uploaded files
|
|
|
|
enableUserAccounts: true,
|
|
|
|
|
|
|
|
/*
|
|
|
|
Here you can decide if you want lolisafe to serve the files or if you prefer doing so via nginx.
|
|
|
|
The main difference between the two is the ease of use and the chance of analytics in the future.
|
|
|
|
If you set it to `true`, the uploaded files will be located after the host like:
|
|
|
|
https://lolisafe.moe/yourFile.jpg
|
|
|
|
|
|
|
|
If you set it to `false`, you need to set nginx to directly serve whatever folder it is you are serving your
|
|
|
|
downloads in. This also gives you the ability to serve them, for example, like this:
|
|
|
|
https://files.lolisafe.moe/yourFile.jpg
|
|
|
|
|
|
|
|
Both cases require you to type the domain where the files will be served on the `domain` key below.
|
|
|
|
Which one you use is ultimately up to you.
|
|
|
|
*/
|
|
|
|
serveFilesWithNode: false,
|
|
|
|
domain: 'https://lolisafe.moe',
|
|
|
|
|
2018-02-07 06:45:18 +00:00
|
|
|
/*
|
|
|
|
If you are serving your files with a different domain than your lolisafe homepage,
|
|
|
|
then fill this option with your lolisafe homepage, otherwise leave it null (or other falsy value).
|
2018-04-18 21:00:36 +00:00
|
|
|
This will be used when listing album links in the dashboard.
|
2018-02-07 06:45:18 +00:00
|
|
|
*/
|
2018-04-18 21:00:36 +00:00
|
|
|
homeDomain: null,
|
2018-02-07 06:45:18 +00:00
|
|
|
|
2018-01-23 20:06:30 +00:00
|
|
|
// Port on which to run the server
|
|
|
|
port: 9999,
|
|
|
|
|
|
|
|
// Pages to process for the frontend
|
|
|
|
pages: ['home', 'auth', 'dashboard', 'faq'],
|
|
|
|
|
2018-04-25 13:16:34 +00:00
|
|
|
/*
|
|
|
|
If set to true, all extensions in "extensionsFilter" array will be blacklisted,
|
|
|
|
otherwise only files with those extensions that can be uploaded.
|
|
|
|
*/
|
|
|
|
filterBlacklist: true,
|
|
|
|
|
|
|
|
extensionsFilter: [
|
2018-03-15 07:54:14 +00:00
|
|
|
'.jar',
|
2018-01-23 20:06:30 +00:00
|
|
|
'.exe',
|
2018-03-15 07:54:14 +00:00
|
|
|
'.msi',
|
|
|
|
'.com',
|
2018-01-23 20:06:30 +00:00
|
|
|
'.bat',
|
|
|
|
'.cmd',
|
2018-03-15 07:54:14 +00:00
|
|
|
'.scr',
|
|
|
|
'.ps1',
|
2018-01-23 20:06:30 +00:00
|
|
|
'.sh'
|
|
|
|
],
|
|
|
|
|
|
|
|
// Uploads config
|
|
|
|
uploads: {
|
|
|
|
|
|
|
|
// Folder where images should be stored
|
|
|
|
folder: 'uploads',
|
|
|
|
|
|
|
|
/*
|
|
|
|
Max file size allowed. Needs to be in MB
|
|
|
|
Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
|
|
|
|
*/
|
|
|
|
maxSize: '512MB',
|
|
|
|
|
2018-03-28 11:36:28 +00:00
|
|
|
/*
|
|
|
|
Chunked uploads.
|
2018-04-25 13:16:34 +00:00
|
|
|
If this is enabled, every files uploaded from the homepage uploader will forcibly be chunked
|
|
|
|
by the size specified in "chunkSize". People will still be able to upload bigger files with
|
|
|
|
the API as long as they don't surpass the limit specified in the "maxSize" option above.
|
|
|
|
Total size of the whole chunks will also later be checked against the "maxSize" option.
|
|
|
|
No-JS uploader page will not have chunked uploads support, if you want to change the maximum
|
|
|
|
file size 'displayed' on it, you can change the value of "noJsMaxSize".
|
|
|
|
You can also set it to null (or other falsy values) to inherit the value of "maxSize" option.
|
|
|
|
"chunkSize", and "noJsMaxSize" if set, need to be in MB.
|
2018-03-28 11:36:28 +00:00
|
|
|
*/
|
|
|
|
chunkedUploads: {
|
|
|
|
enabled: true,
|
2018-04-25 13:16:34 +00:00
|
|
|
chunkSize: '10MB',
|
|
|
|
noJsMaxSize: null
|
2018-03-28 11:36:28 +00:00
|
|
|
},
|
|
|
|
|
2018-03-24 13:52:47 +00:00
|
|
|
/*
|
|
|
|
The length of the random generated name for the uploaded files.
|
|
|
|
If "userChangeable" is set to true, registered users will be able to change
|
|
|
|
their preferred file name length from the dashboard. The allowed range will
|
|
|
|
be set by "min" and "max". Otherwise it will use "default".
|
|
|
|
Technically it's possible to have "default" outside of the "min" and "max" range,
|
2018-04-25 13:16:34 +00:00
|
|
|
but please not. Otherwise, once a user has changed to a value within the range,
|
|
|
|
the user will no longer be able to use the default value.
|
2018-03-24 13:52:47 +00:00
|
|
|
*/
|
|
|
|
fileLength: {
|
|
|
|
min: 4,
|
|
|
|
max: 32,
|
|
|
|
default: 32,
|
|
|
|
userChangeable: false
|
|
|
|
},
|
2018-01-23 20:06:30 +00:00
|
|
|
|
2018-03-18 13:13:08 +00:00
|
|
|
/*
|
2018-04-25 13:16:34 +00:00
|
|
|
This option will limit how many times it will
|
|
|
|
try to generate a new random name when a collision occurrs.
|
|
|
|
The shorter the file name length is, the higher the chance for a collision to occur.
|
|
|
|
*/
|
2018-03-18 13:13:08 +00:00
|
|
|
maxTries: 1,
|
|
|
|
|
2018-01-23 20:06:30 +00:00
|
|
|
/*
|
|
|
|
NOTE: Thumbnails are only for the admin panel and they require you
|
|
|
|
to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
|
|
|
|
for images and ffmpeg (https://ffmpeg.org/) for video files
|
|
|
|
*/
|
2018-03-24 13:52:47 +00:00
|
|
|
generateThumbnails: {
|
|
|
|
image: true,
|
|
|
|
video: false
|
|
|
|
},
|
2018-01-23 20:06:30 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Allows users to download a .zip file of all files in an album.
|
|
|
|
The file is generated when the user clicks the download button in the view
|
|
|
|
and is re-used if the album has not changed between download requests
|
|
|
|
*/
|
|
|
|
generateZips: true
|
|
|
|
},
|
|
|
|
|
|
|
|
// Folder where to store logs
|
|
|
|
logsFolder: 'logs',
|
|
|
|
|
|
|
|
// The following values shouldn't be touched
|
|
|
|
database: {
|
|
|
|
client: 'sqlite3',
|
|
|
|
connection: { filename: './database/db' },
|
|
|
|
useNullAsDefault: true
|
|
|
|
}
|
|
|
|
}
|