Skip to content

Instantly share code, notes, and snippets.

@kmaher9
Created July 3, 2019 20:59
Show Gist options
  • Save kmaher9/57ad5a9f77ced1fab9f54a8167fd9f5b to your computer and use it in GitHub Desktop.
Save kmaher9/57ad5a9f77ced1fab9f54a8167fd9f5b to your computer and use it in GitHub Desktop.
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