npm.io
0.1.5 • Published 5 years ago

@osjs/ftp-adapter

Licence
MIT
Version
0.1.5
Deps
2
Size
11 kB
Vulns
0
Weekly
0
Stars
2

OS.js Logo

OS.js is an open-source web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more.

Support Support Donate Donate Community

OS.js FTP VFS Adapter

This is the FTP VFS (Server) Adapter for OS.js.

This is a work in progress

Installation

npm install @osjs/ftp-adapter

Usage

In your src/server/index.js bootstrap file:

const ftpAdapter = require('@osjs/ftp-adapter');

osjs.register(VFSServiceProvider, {
  args: {
    adapters: {
      ftp: ftpAdapter
    }
  }
});

Then create a mountpoint in your configuration files:

// src/server/config.js
{
  vfs: {
    mountpoints: [{
      name: 'myftp',
      adapter: 'ftp',
      attributes: {
        connection: {
          host: 'localhost',
          user: 'osjs',
          password: 'osjs',
          secure: false
        }
      }
     }]
   }
}

// src/client/config.js
{
  vfs: {
    mountpoints: [{
      name: 'myftp',
      label: 'My FTP Drive'
     }]
   }
}

At some point users can create their own server mounts via the client.

Contribution

Documentation

See the Official Manuals for articles, tutorials and guides.