multer-sftp
SFTP storage engine for Multer
Install
$ npm install --save multer-sftp ssh2-sftp-client
Usage
var multer = var sftpStorage = var storage = var upload =
API
var sftpStorage =
sftpStorage(opts)
The module returns a function that can be invoked with options to create a Multer storage engine.
opts
sftp: Object { return } { return }
sftp
: Required.sftp
is a settings object for sftp client connection. Please see ssh2 documentation for details.destination
: Required.destination
is used to determine within which folder the uploaded files should be stored. This can also be given as astring
(e.g.'/tmp/uploads'
).filename
: Optional.filename
is used to determine what the file should be named inside the folder. If nofilename
is given, each file will be given a random name that doesn't include any file extension.
License
MIT © Chun-Kai Wang