cmda-bt / be-course-19-20

🎓 Backend · 2019-2020 · Curriculum and Syllabus
Other
18 stars 7 forks source link

Week 3 #228

Closed NathanNeelis closed 4 years ago

NathanNeelis commented 4 years ago

Package

Name

Nathan Neelis

Class

Tech 4

Repo link

NathanNeelis

Summary

I used the post method in a registration form to generate more profile cards. With some help, I got the form to input data in my data object. The only thing I still have to work on is how to upload images using Multer. At the moment the image is uploading, but with some randomly generated name and without an extension which is a problem when I'm trying to use it in ejs templating.

Resources used

Any thoughts?

I was waiting for my posted data to update my data object. But apparently it doesn't get added in the JS file, just temporary somewhere in magic land. Thanks to Karin I found out that they did get added, using console.log on the data object.
I still have to finish the upload file with Multer, but moving on first with Mongo and will get back to this later.

Update: Got the Multer working properly with adding the right extension for png or jpg. Proud of myself and really thankful to stackoverflow!