miladhashemi / osjs-ftp-adapter

OS.js FTP VFS Adapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Links

About

OS.js FTP VFS Adapter

License:Other


Languages

Language:JavaScript 100.0%