Q:

File upload in Node JS

I want to upload a file to a s3 bucket , that the user chossing in front end , I am clear with how to upload a file to s3 bucket using node js, but am struggling in getting the location of the file to backend. In other words , I want to upload a file to s3 bucket using node js that the client chossing in its front end ! How can i achieve this ?

A:

I am assuming you are following this flow: client->nodejs->S3 and you know the nodejs->S3 part. For the client->nodejs part, you have more than one option depending on the framework you are using in Node.js for the web app. Express needs multipart middleware to be added for multipart uploads (e.g. connect-busboy or multer or connect-multiparty). Sails.js uses skipper for streaming file uploads. Skipper also includes support for S3 uploads.

