0.2.30 • Published 4 years ago

ngx-ffm v0.2.30

Weekly downloads
148
License
-
Repository
-
Last release
4 years ago

Angular FTP File Manager

This is an FTP client for Angular.

Image of File manager

Features

  1. File upload to FTP server. (single)
  2. File download from FTP server. (single or multiple)
  3. File delete from FTP server. (single or multiple)
  4. 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

4 years ago

0.2.29

4 years ago

0.2.28

4 years ago

0.2.27

4 years ago

0.2.26

4 years ago

0.2.25

4 years ago

0.2.24

4 years ago

0.2.23

4 years ago

0.2.22

4 years ago

0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago