Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@rign/angular2-filemanager
Advanced tools
This project is a very simple Angular2 file manager.
Install npm package
npm i @rign/angular2-filemanager
In your project put this line
<filemanager>Loading...</filemanager>
In your module add following lines with configuration
import {FileManagerModule, IFileManagerConfiguration} from '../../../main';
...
const fileManagerConfiguration: IFileManagerConfiguration = {
urls: {
foldersUrl: '/api/folder',
filesUrl: /api/files,
folderMoveUrl: '/api/folder/move'
},
isMultiSelection: true,
mimeTypes: ['image/jpg', 'image/jpeg', 'image/png'],
maxFileSize: 50 * 1024
}
...
You can create a simple configuration object, it should contains a subset of below options
Then you have to provide this constant as a configuration service
@NgModule({
...
imports: [
...,
FileManagerModule
],
providers: [
{provide: 'fileManagerConfiguration', useValue: fileManagerConfiguration}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Now you should create your own API service to communicate with backend or use existing one FileManagerBackendApiService (remember, it should extend AbstractFileManagerApi and implements IFileManagerApi). If you create your own API service it should have implemented IFileManagerApi interface
All those actions should manipulate on two protected properties:
You can see two examples of that service:
Because of using store, actions and effects you can attach to any actions by creating your own effects service. You are able to connect to actions for doing something special (but this is not obligatory, this is only possibility):
Filemanager module has configured translation for english (default language) and polish. You can add translations for other languages as it is described in Translate Module documentation. In Filemanager Module you are able to set following labels:
To change language to polish you have to add these lines to your app module:
export class AppModule {
public constructor(translate: TranslateService) {
translate.use('pl');
}
}
To run local demo you have to serve frontend and backend. To do this run:
frontend:
using local storage
npm start
or using real backend
npm run startWithBackend
backend
npm run backend
Or you can see online demo with local storage
Licensed under MIT.
FAQs
Filemanager component to display structure of directories and files
The npm package @rign/angular2-filemanager receives a total of 2 weekly downloads. As such, @rign/angular2-filemanager popularity was classified as not popular.
We found that @rign/angular2-filemanager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.