Created
July 3, 2019 20:59
-
-
Save kmaher9/57ad5a9f77ced1fab9f54a8167fd9f5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose') | |
const fileSchema = new mongoose.Schema({ | |
name: { type: String, required: true }, | |
size: { type: Number, required: false }, | |
location: { type: String, required: true }, | |
mime: { type: String, required: true } | |
}, { timestamps: true }) | |
module.exports = mongoose.model('file', fileSchema) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment