In order to store the uploaded profile photo directly in the database, we will update the user model to add a photo field that stores the file as data of type Buffer, along with its contentType.
mern-social/server/models/user.model.js:
photo: { data: Buffer, contentType: String}