0.2.30 • Published 5 years ago
ngx-ffm v0.2.30
Angular FTP File Manager
This is an FTP client for Angular.
Features
- File upload to FTP server. (single)
- File download from FTP server. (single or multiple)
- File delete from FTP server. (single or multiple)
- Displays the specified directory's file list.
Getting started
Prerequisites:
npm install @angular/material
npm install @angular/flex-layout
Installation
npm install ngx-ffm
App Module
import { NgxFfmModule } from 'projects/ngx-ffm/src/public-api';
// And the material modules ...
...
imports: [
NgxFfmModule.forRoot({
apiHost: 'http://127.0.0.1:5000/api'
})
],
...
Usage
Html
<ngx-ffm [input]="file"></ngx-ffm>
Typescript
App Component
import { NgxFfmComponent } from 'projects/ngx-ffm/src/public-api';
...
file: File; // ngx-ffm type
...
title = 'filemanager';
ngOnInit(): void {
this.file = {
filePath : '/filepath/to/your/server/directory'
// and the optional fields
};
}
Ngx-ffm Service
getDocuments(filepath) // Get files from the FTP server using the filepath given in the parameter
async getDocumentOpen(filename, filepath) // Download the specified file(s) from the FTP server using the filepath given in the parameter.
async postDocument(formData, filepath) // Upload the specified file from the FTP server using the filepath given in the parameter. formData --> file object
async deleteDocumentLocal(filename) // Delete the specified file from the local file system
deleteDocument(filenames, filepath) // Delete the specified file(s) from the FTP server using the filepath given in the paramerter
File-manager model
export class File {
filePath?: string; // FTP server directory filepath
delete?: boolean; // displays the 'download' button, optional, default value is true
download?: boolean; // displays the 'download' button, optional, default value is true
upload?: boolean; // displays the 'upload' button, optional, default value is true
}
0.2.30
5 years ago
0.2.29
5 years ago
0.2.28
5 years ago
0.2.27
5 years ago
0.2.26
5 years ago
0.2.25
5 years ago
0.2.24
5 years ago
0.2.23
5 years ago
0.2.22
5 years ago
0.2.20
5 years ago
0.2.19
5 years ago
0.2.18
5 years ago
0.2.17
5 years ago
0.2.16
5 years ago
0.2.15
5 years ago
0.2.14
5 years ago
0.2.13
5 years ago
0.2.12
5 years ago
0.2.11
5 years ago
0.2.10
5 years ago
0.2.9
5 years ago
0.2.8
5 years ago
0.2.7
5 years ago
0.2.6
5 years ago
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.2
5 years ago
0.1.0
5 years ago
0.1.1
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago