Skip to content

1.1.0

Latest
Compare
Choose a tag to compare
@hnrch02 hnrch02 released this 08 Jan 06:33
· 2 commits to master since this release

Added connection option to pass an existing instance of ftp instead of creating a new one.

Example:

var multer = require('multer')
var FTPStorage = require('multer-ftp')
var FTP = require('ftp')
var ftp = new FTP()

ftp.connect({
  host: 'example.com',
  user: 'user',
  password: 'password'
})

var upload = multer({
  storage: new FTPStorage({
    basepath: '/remote/path',
    connection: ftp
  })
})