hedgedoc/lib/web/utils.js
Dustin Frisch f47601857e
Allow posting new note with content
Signed-off-by: Dustin Frisch <fooker@lab.sh>
2018-01-18 10:41:58 +01:00

16 lines
387 B
JavaScript

'use strict'
const bodyParser = require('body-parser')
// create application/x-www-form-urlencoded parser
exports.urlencodedParser = bodyParser.urlencoded({
extended: false,
limit: 1024 * 1024 * 10 // 10 mb
})
// create text/markdown parser
exports.markdownParser = bodyParser.text({
inflate: true,
type: ['text/plain', 'text/markdown'],
limit: 1024 * 1024 * 10 // 10 mb
})