This project is a very simple Angular2 file manager.
- fix problem with open "choose file window"
- use 0.8.1 version of angular2-tree
- use 0.7.0 version of angular2-tree
- use 0.6.2 version of angular2-tree
- fix example
- add multi selection configuration
- add onSingleFileSelect event, which could be use to select file
- remove title from main template
- fix crop example
- fix preview
- fix example API
- create FileManagerUploader service to control upload files, it could be override by external module
- remove unnecessary export file
- manage directory structure
- upload/delete files
- filter files in directory by mime types
- search file in directory by name
- preview files
Install npm package
npm i @rign/angular2-filemanager
In your project put this line
<filemanager [multiSelection]="isMultiSelection" (onSingleFileSelect)="selectFile($event)">Loading...</filemanager>
To override endpoints to manage files and directories provide special provider in you module
@NgModule({
...
providers: [
...
{
provide: 'fileManagerUrls',
useValue: {foldersUrl: '/api/filemanager/folder', filesUrl: '/api/filemanager/file'}
}
]
...
})
To run demo you have to serve frontend and backend. To do this run:
-
frontend:
npm start
-
backend
npm run backend
- files upload progress
- multi selection events (delete, select)