Coder Social home page Coder Social logo

skipper-ftp's Introduction

skipper emblem - face of a ship's captain Skipper FTP Adapter

npm npm

This is used to upload files directly to FTP server using skipper and node-ftp

Installation

$ npm install skipper-ftp --save

Also make sure you have skipper installed as your body parser.

Skipper is installed by default in Sails v0.10.

Usage

req.file('file')
.upload({
  adapter: require('skipper-ftp'),
  host: 'ftp.localhost',
  port: 21,
  username:'root',
  password:'root',
  path:'/'
}, function whenDone(err, uploadedFiles) {
  if (err) return res.negotiate(err);
  else return res.ok({
    files: uploadedFiles
  });
});
Option Type Details
host ((string)) An optional parameter of the host or domain/IP. Default value: localhost
port ((number)) An optional parameter for port. Default value :21
path ((string)) An optional parameter if you wish to save the file in a particular path in your file server. Default value :/
user ((string)) An optional parameter for authentication. Default value :root
password ((string)) An optional parameter for authentication. Default value :root

check node-ftp options for more

UploadedFiles

The meta data is returned along with extra which may contain error field. The error is going to return and error encountered while uploading the file to your FTP server

Testing

  • Clone this repository

  • Install all development dependencies

$ npm install
  • Then run test
$ npm test

Contribute

Fork this repo and push in your ideas. Do not forget to follow skipper-adapter-test standards

License

MIT License (MIT)

skipper-ftp's People

Contributors

theoomoregbee avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.