text: import multer from 'multer'
  import crypt from 'crypto'
  import { extname, resolve } from 'path'
  
  export default {
    storage: multer.diskStorage({
      destination: resolve(__dirname, '..', '..', 'temp', 'uploads'),
      filename: (req, file, cb) => {
        crypt.randomBytes(16, (err, res) => {
          if (err) return cb(err)
          return cb(null, res.toString('hex') + extname(file.originalname))
        })
      }
    })
  
  }
  