인프런 커뮤니티 질문&답변
video model 질문입니다.
작성
·
273
답변 3
0
John Ahn
지식공유자
모델에 작성하고 새로 파일을 다시 올려도 안되나요 ?
다시 해도 안됐나면 데이터를 디비에 전송할때 duration 정보도 같이 전해지고 있는지 한번 확인해 주세요 ~ !
0
0
John Ahn
지식공유자
Model 폴더에
video.js 있죠 ?
거기에
const videoSchema = mongoose.Schema({
writer: {
type: Schema.Types.ObjectId,
ref: 'User'
},
title: {
type:String,
maxlength: 50
},
description: {
type: String,
},
privacy: {
type: Number,
},
filePath : {
type: String,
},
category : {
type: String,
},
views: {
type: Number,
default: 0
},
duration: {
type: String
},
thumbnail: {
type: String
}
},{timestamps:true})
이런식으로 duration을 추가해주세요 ~





