egg-upyun
currently only supports server access Authorization, and then USES the client (android/ios) to get the key to upload.
Install
$ npm i egg-upyun --save
Usage
// {app_root}/config/plugin.jsexportsupyun = enable: true package: 'egg-upyun';
Configuration
// {app_root}/config/config.default.jsexportsupyun = name: 'The service name' username: 'The operator' password: 'Operator password' cdnUrl: 'Speed up the domain';
see config/config.default.js for more detail.
Example
// {app_root}/XX.jsconst paramData = bucket: configupyunname // Upload the space service name. expiration: // The expiration date of the request. 'allow-file-type': 'jpg,jpeg,png,gif' // The file type 'content-length-range': '1,1024000'// File size ;data = await appupyun;
Introduction
- this is a cloud service solution.
- simplified and patted the cloud API without worrying about memory leaks.
Questions & Suggestions
Please open an issue here.