Reputation: 340
In MeteorJS, I can't figure out how to retrieve data from a URL that starts with 'ftp' instead of the usual 'http'. The URL is ftp://webftp.vancouver.ca/OpenData/json/drinking_fountains.json
In the off-chance that the standard meteor http package might emulate FTP, I wishfully attempted to use meteor's HTTP.get(url) call, but got the error:
url must be absolute and start with http:// or https://
I searched google and AtmosphereJS for a Meteor package to provide FTP client functionality, but didn't find anything.
Any suggestions?
Upvotes: 2
Views: 830
Reputation: 2170
Javascript only 'speaks' http and websockets. If you need to emulate an FTP client within the browser there are ways to do that using Java or Flash plugins. Generally this will not be the best way to solve the problem.
Alternatively, you can use an NPM package on the server-side of meteor, such as, jsftp which gets the file and then serves it to the client when requested.
Upvotes: 2