| 123456789 |
- const chunkModel = require('../model/chunk.model')
- const handleError = require('../utils/handleError')
- exports.getDokumen = handleError(async (req, res) => {
- const { id } = req.params
- const data = await chunkModel.findById(id)
- res.header('Content-Type', data.type)
- return res.end(Buffer.from(data.data))
- })
|