Sunday 19 March 2017

Upload file with MEAN stack (angular2, node.js, express, mongodb)

I want to be able to store files according to the user of the application. The client will send me the file to be stored, as well as the token to identify the user, and also the name that the user gave to his file, the year of the file... This information will be sent to me through a multipart HTTP request. With Node.js, I want to be able to retrieve the file, token and other information sent to store it and update the database.

I saw that I can use Multer but I don't understand how to recover both the file and also the token and other information sent. I'm using Node.JS, Express and MongoDB.

PS : Excuse me for misspellings i am french and Node.js is new for me.



via Lea

No comments:

Post a Comment