Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added skipper for ftp file server #177

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,43 @@ It exposes the following adapter-specific options:
container | ((string)) | The container to upload your files into, e.g. `"my_cool_file_uploads"` (_required_)


#### Uploading files to FTP File server

```shell
$ npm install skipper-ftp --save
```

[skipper-ftp](https://github.com/theo4u/skipper-ftp) This is used to upload files directly to FTP server using [skipper](https://github.com/balderdashy/skipper) and [node-ftp](https://github.com/mscdex/node-ftp)

```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](https://github.com/mscdex/node-ftp#methods) options for more



<!--
============================================

Expand Down