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. '.msi',
  33. '.com',
  34. '.bat',
  35. '.cmd',
  36. '.nt',
  37. '.scr',
  38. '.ps1',
  39. '.psm1',
  40. '.sh',
  41. '.bash',
  42. '.bsh',
  43. '.csh',
  44. '.bash_profile',
  45. '.bashrc',
  46. '.profile'
  47. ],
  48. // Uploads config
  49. uploads: {
  50. // Folder where images should be stored
  51. folder: 'uploads',
  52. /*
  53. Max file size allowed. Needs to be in MB
  54. Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
  55. */
  56. maxSize: '512MB',
  57. // The length of the random generated name for the uploaded files
  58. fileLength: 32,
  59. /*
  60. This option will limit how many times it will try to generate random names
  61. for uploaded files. If this value is higher than 1, it will help in cases
  62. where files with the same name already exists (higher chance with shorter file name length).
  63. */
  64. maxTries: 1,
  65. /*
  66. NOTE: Thumbnails are only for the admin panel and they require you
  67. to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  68. for images and 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. }