let photoId = mongoose.Types.ObjectId(`${virtual.productId[0]}`)

await model.photo.findByIdAndUpdate(photoId, {
$set: {
photto: photo
}
}, {
upsert: true
})

04-13 18:10