config.sample.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 lolisafe 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 set nginx to directly serve whatever folder it is you are serving your
  17. downloads in. This also gives you the ability to serve them, for example, like this:
  18. https://files.lolisafe.moe/yourFile.jpg
  19. Both cases require you to type the domain where the files will be served on the `domain` key below.
  20. Which one you use is ultimately up to you.
  21. */
  22. serveFilesWithNode: false,
  23. domain: 'https://lolisafe.moe',
  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. '.jar',
  31. '.exe',
  32. '.exec',
  33. '.msi',
  34. '.com',
  35. '.bat',
  36. '.cmd',
  37. '.nt',
  38. '.scr',
  39. '.ps1',
  40. '.psm1',
  41. '.sh',
  42. '.bash',
  43. '.bsh',
  44. '.csh',
  45. '.bash_profile',
  46. '.bashrc',
  47. '.profile'
  48. ],
  49. // Uploads config
  50. uploads: {
  51. // Folder where images should be stored
  52. folder: 'uploads',
  53. /*
  54. Max file size allowed. Needs to be in MB
  55. Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
  56. */
  57. maxSize: '512MB',
  58. // The length of the random generated name for the uploaded files
  59. fileLength: 32,
  60. /*
  61. This option will limit how many times it will try to generate random names
  62. for uploaded files. If this value is higher than 1, it will help in cases
  63. where files with the same name already exists (higher chance with shorter file name length).
  64. */
  65. maxTries: 1,
  66. /*
  67. NOTE: Thumbnails are only for the admin panel and they require you
  68. to install a separate binary called ffmpeg (https://ffmpeg.org/) for video files
  69. */
  70. generateThumbnails: false,
  71. /*
  72. Allows users to download a .zip file of all files in an album.
  73. The file is generated when the user clicks the download button in the view
  74. and is re-used if the album has not changed between download requests
  75. */
  76. generateZips: true
  77. },
  78. // Folder where to store logs
  79. logsFolder: 'logs',
  80. // The following values shouldn't be touched
  81. database: {
  82. client: 'sqlite3',
  83. connection: { filename: './database/db' },
  84. useNullAsDefault: true
  85. }
  86. }