Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config = "/path/to/filemanager.config.json"; //Change this to the actual l
var app = express();

//Filemanager route
app.use( '/filemanager', filemanager( "/path/to/dir", config ) );
app.use( '/filemanager', filemanager( "/path/to/dir", config, '/temporary/upload/dir' ) );
// '/filemanager' is the connector url.
// Don't forget to set it in the api.connectorUrl of `filemanager.config.json` for the frontend

Expand Down Expand Up @@ -51,4 +51,4 @@ Follow these steps to set up the demo
## API functions not yet implemented
1. seekfolder
2. summarize
3. extract
3. extract
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const paths = require('path');
const multer = require('multer');
paths.posix = require('path-posix');

const router = express.Router(); // eslint-disable-line
const upload = multer({dest: 'public/'});
const router = express.Router(); // eslint-disable-lin

module.exports = (__appRoot, configPath) => { // eslint-disable-line max-statements
module.exports = (__appRoot, configPath, dest='public/') => { // eslint-disable-line max-statements
const upload = multer({dest: dest});
//Init config
if ( typeof( configPath ) == "string" ) {
config = require(configPath);
Expand Down Expand Up @@ -509,4 +509,4 @@ module.exports = (__appRoot, configPath) => { // eslint-disable-line max-stateme
} // respond

return router;
}; // module.exports
}; // module.exports