Gathering detailed insights and metrics for ng-file-manager-express
Gathering detailed insights and metrics for ng-file-manager-express
Gathering detailed insights and metrics for ng-file-manager-express
Gathering detailed insights and metrics for ng-file-manager-express
npm install ng-file-manager-express
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (98.13%)
JavaScript (1.87%)
Total Downloads
2,194
Last Day
1
Last Week
9
Last Month
31
Last Year
397
2 Stars
22 Commits
1 Forks
1 Watching
1 Branches
1 Contributors
Latest Version
0.1.6
Package Id
ng-file-manager-express@0.1.6
Unpacked Size
114.55 kB
Size
28.39 kB
File Count
81
NPM Version
5.2.0
Node Version
8.10.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
350%
9
Compared to previous week
Last month
342.9%
31
Compared to previous month
Last year
51%
397
Compared to previous year
21
Express app/middleware for ng-file-manager
Give me a shout at Gitter:
Testing is mid-way and although unlikely, some breaking changes might come. Likely this however will only affect you if you decide to make your own connector. REST API will not see breaking changes.
/path/to/middleware/folder
/path/to/middleware/folder/x.jpg
/path/to/middleware/folder/x.jpg
x.jpg
to folder
file
/path/to/middleware/folder/x.jpg
/path/to/middleware/folder
ngfm-hash
/path/to/middleware/folder/x2.jpg?from=fileHash_abc123
/path/to/middleware/folder2?from=folderHash_abc123
Examples are in TS. For JS, basically you should only need to remove types and replace
import { X } from 'ng-file-manager-express;
with -->
const { X } = require('ng-file-manager-express');
import express from 'express'
import * as path from 'path';
import { NgfmFileConnector } from 'ngfm-file-manager-express';
import { NgfmExpress } from 'ngfm-file-manager-express';
class DevApp {
public express
constructor() {
this.express = express()
this.mountRoutes()
}
private mountRoutes(): void {
const router = express.Router()
router.get('/', (req, res) => { res.json({ message: 'Hello World!' }) });
this.express.use('/', router);
/**
* Create a root for private user files.
*/
const commonRoot = path.join(__dirname, 'dev-files');
const privateRoot = path.join(commonRoot, 'private');
const privateConnector = new NgfmFileConnector({
root: privateRoot,
createRoot: true
});
/**
* Only an authenticated user with the correct userId can access/modify.
* This is where your own Auth middleware would need to step in and check the user.
*/
this.express.use('/files/private/:userId', (req, res, next) => {
if (req.params.userId !== '1337') {
return res.status(401).send('Unauthorized');
}
next();
});
this.express.use('/files/private', new NgfmExpress(privateConnector, {
serveStatic: privateRoot
}).router);
/**
* Create a public root
*/
const publicRoot = path.join(commonRoot, 'public');
const publicConnector = new NgfmFileConnector({
root: publicRoot,
createRoot: true
});
this.express.use('/files/public', new NgfmExpress(publicConnector, {
serveStatic: publicRoot
}).router);
}
}
export default new DevApp().express
import app from './dev-app'
const port = process.env.PORT || 3000
app.listen(port, (err) => {
if (err) {
return console.log(err);
}
return console.log(`server is listening on ${port}`);
})
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/22 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
101 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More