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
Filemanager component to display structure of directories and files
This project is a very simple Angular2 file manager.
Install npm package
npm i @rign/angular2-filemanager --save
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,
allowChooseMultipleFiles: true
}
...
You can create a simple configuration object, it should contains a subset of below options
Then you have to provide this value as configuration for the module
@NgModule({
...
imports: [
...,
FileManagerModule.forRoot(fileManagerConfiguration)
],
bootstrap: [AppComponent]
})
export class AppModule {
}
You have also add few other modules:
imports: [
...,
BrowserAnimationsModule,
ConfirmationPopoverModule.forRoot(),
EffectsModule.forRoot([]),
FileManagerModule.forRoot(fileManagerConfiguration),
StoreModule.forRoot({}),
TreeModule.forRoot(),
TranslateModule.forRoot(),
]
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 clone repo and start
ng start --project=filemanager-example
Or you can see it 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.