This is used to upload files directly to FTP server skipper adapter
npm install skipper-ftp
Skipper FTP AdapterThis is used to upload files directly to FTP server using skipper and node-ftp
```
$ 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.
`javascript`
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
which may contain error field. The error is going to return ana error encountered while uploading the file to your FTP serverTesting
* Clone this repository
* Install all development dependencies
`sh
$ npm install
`
* Then run test`sh
$ npm test
``Fork this repo and push in your ideas.
Do not forget to follow skipper-adapter-test standards
MIT License (MIT)