I have NodeJS restify setup and I'm using mongoose-attachments to attach images to my user model, and storing the images on an S3 bucket.
I'm also allowing users to signup using Facebook, Google etc using Passport.JS.
The problem is that mongoose-attachments expects a local file reference when calling the .attach() function, and PassportJS gives a remote URL - so I need to download the image and then attach it from tmp.
How should I approach this with NodeJS? Is there a good module I can use for this?