hapi-upyun

0.0.1 • Public • Published

config

{
  plugin: 'hapi-upyun',
  options: {
    username: 'your username of upyun',
    password: 'your password',
    domain: 'url prefix',
    bucket: 'bucket'
  }
}

useage

// const Joi = require('joi')
module.exports = ({ server }) => {
  const { upload } = server.plugins['hapi-upyun']
  return {
    tags: ['api'],
    description: '生成上传又拍云时需要的参数',
    async handler (request, h) {
      const data = upload.getBodyParams({ date: new Date() })
      return data
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i hapi-upyun

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

2.68 kB

Total Files

4

Last publish

Collaborators

  • vaseala.com