parse-server file adapter for FTP upload and HTTP download
npm install --save parse-server-ftp-http-adapter
...
var FtpHttpAdapter = require('parse-server-ftp-http-adapter');
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
appId: process.env.APP_ID || 'APPLICATION_ID',
masterKey: process.env.MASTER_KEY || 'MASTER_KEY',
...
filesAdapter: new FtpHttpAdapter({
ftp: {
host: "example.com", # required
port: 21, # defaults to 21
username: "user", # defaults to "anonymous"
password: "secret", # defaults to "anonymous@"
path: "/example.com/uploads" # defaults to "/"
... # any other options to send to node-ftp
},
http: {
host: "http://example.com", # required
port: 80, # defaults to 80
path: "/uploads" # defaults to "/"
},
debug: true # defaults to false
}),
...
});