[NodeJS]Uploading video with multer

cho yunsu·2021년 3월 8일
0
  1. how the server recognizes the title and description from the front-end? : it's from the post method form and each input of it!

  2. how the filename and path automatically defined? : multer!

  3. how the shape of this wonderful data information made? : schema in the Video.js ! mongoose.model("Video", videoSchema).

  4. this is real question haha.. how the newVideo.id made? I know it is same as the filename, but I can't understand where it came from. Is the id just the one of it's object, by default?


1.It is because of the 'name' on the input html.
2. multer
3. yes
4.newVideo.id is created automatically for you by Mongo, mongo creates super random and unique ids.

profile
Growing Developer!!

0개의 댓글