config.sample.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. '.scr',
  37. '.ps1',
  38. '.sh'
  39. ],
  40. // Uploads config
  41. uploads: {
  42. // Folder where images should be stored
  43. folder: 'uploads',
  44. /*
  45. Max file size allowed. Needs to be in MB
  46. Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
  47. */
  48. maxSize: '512MB',
  49. // The length of the random generated name for the uploaded files
  50. fileLength: 32,
  51. /*
  52. This option will limit how many times it will try to generate random names
  53. for uploaded files. If this value is higher than 1, it will help in cases
  54. where files with the same name already exists (higher chance with shorter file name length).
  55. */
  56. maxTries: 1,
  57. /*
  58. NOTE: Thumbnails are only for the admin panel and they require you
  59. to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  60. for images and ffmpeg (https://ffmpeg.org/) for video files
  61. */
  62. generateThumbnails: false,
  63. /*
  64. Allows users to download a .zip file of all files in an album.
  65. The file is generated when the user clicks the download button in the view
  66. and is re-used if the album has not changed between download requests
  67. */
  68. generateZips: true
  69. },
  70. // Folder where to store logs
  71. logsFolder: 'logs',
  72. // The following values shouldn't be touched
  73. database: {
  74. client: 'sqlite3',
  75. connection: { filename: './database/db' },
  76. useNullAsDefault: true
  77. }
  78. }