config.sample.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. module.exports = {
  2. /*
  3. If set to true the user will need to specify the auto-generated token
  4. on each API call, meaning random strangers wont be able to use the service
  5. unless they have the token loli-safe provides you with.
  6. If it's set to false, then upload will be public for anyone to use.
  7. */
  8. private: true,
  9. // If true, users will be able to create accounts and access their uploaded files
  10. enableUserAccounts: true,
  11. /*
  12. Here you can decide if you want lolisafe to serve the files or if you prefer doing so via nginx.
  13. The main difference between the two is the ease of use and the chance of analytics in the future.
  14. If you set it to `true`, the uploaded files will be located after the host like:
  15. https://lolisafe.moe/yourFile.jpg
  16. If you set it to `false`, you need to specify the domain in the setting right below `serveFilesWithNode`
  17. and make nginx directly serve whatever folder it is you are serving your downloads in. This also gives
  18. you the ability to serve them, for example, like this:
  19. https://files.lolisafe.moe/yourFile.jpg
  20. So ultimately, it's up to you.
  21. */
  22. serveFilesWithNode: false,
  23. domain: '',
  24. // Port on which to run the server
  25. port: 9999,
  26. // Pages to process for the frontend
  27. pages: ['home', 'auth', 'dashboard', 'faq'],
  28. // Add file extensions here which should be blocked
  29. blockedExtensions: [
  30. '.exe',
  31. '.bat',
  32. '.cmd',
  33. '.msi',
  34. '.sh'
  35. ],
  36. // Uploads config
  37. uploads: {
  38. // Folder where images should be stored
  39. folder: 'uploads',
  40. /*
  41. Max file size allowed. Needs to be in MB
  42. Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
  43. */
  44. maxSize: '512MB',
  45. // The length of the random generated name for the uploaded files
  46. fileLength: 32,
  47. /*
  48. NOTE: Thumbnails are only for the admin panel and they require you
  49. to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  50. for images and ffmpeg (https://ffmpeg.org/) for video files
  51. */
  52. generateThumbnails: false
  53. },
  54. // Folder where to store logs
  55. logsFolder: 'logs',
  56. // The following values shouldn't be touched
  57. database: {
  58. client: 'sqlite3',
  59. connection: { filename: './database/db' },
  60. useNullAsDefault: true
  61. }
  62. }