Enable file uploader component

This commit is contained in:
garrettmills
2020-02-09 04:37:21 -06:00
parent 8714ab79f1
commit f629e6f3bd
7 changed files with 224 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ const server_config = {
uploads: {
enable: true,
/*
* Used by flitter-upload. Path for uploaded files.
* Should be relative to the application root.
@@ -58,4 +59,4 @@ const server_config = {
}
module.exports = server_config
module.exports = server_config

36
config/upload.config.js Normal file
View File

@@ -0,0 +1,36 @@
/*
* flitter-upload configuration
* ---------------------------------------------------------------
* Specifies the configuration for various uploader aspects. Mainly,
* contains the configuration for the different file upload backends.
*/
const upload_config = {
/*
* The name of the upload backend to use by default.
*/
default_store: 'flitter',
enabled: true,
/*
* Stores available to the uploader.
*/
stores: {
/*
* Example of the basic, filesystem-backed uploader.
* The name of the store is arbitrary. Here, it's called 'flitter'.
*/
flitter: {
enabled: true,
// This is a filesystem backed 'FlitterStore'
type: 'FlitterStore',
// Destination for uploaded files. Will be relative to the root
// path of the application.
destination: './uploads',
},
},
}
module.exports = exports = upload_config