Skip to content

Instantly share code, notes, and snippets.

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