Download/Upload files through REST methods?


Say I wanted to have an endpoint that, when hit by an external client, they can upload files that are located in a specific folder to my Meteor application.

Once my application receives it, it will be able to move the uploaded files to a specific location in the server that the application is hosted.

Alternatively, is there another way to do file transfer between two applications, if one of them is Meteor? Is there another way that would be better than using REST endpoints?

Thank you.


You can basically do this with the normal packages you would use on a NodeJS server. You’ll just have to add a small serverside router and then import the NPM modules you need. Picker is a nice small router for that job.

Then you can basically use the same solutions here, though you’ll need to wrap async methods with a fiber or the server will thrown a fibers error.


I managed to make an uploading server using NodeJS, but when trying to translate that to my Meteor server, I start having issues.