$ npm install provider-upload-ali-oss --save
or
$ yarn add provider-upload-ali-oss --save
The lastest version of the provider supports v4 by default. See example below for ./config/plugins.js
:
module.exports = ({ env }) => ({
upload: {
config: {
provider: 'provider-upload-ali-oss', // full package name is required
providerOptions: {
accessKeyId: env('ALI_ACCESS_KEY_ID', ''),
accessKeySecret: env('ALI_ACCESS_KEY_SECRET', ''),
region: env('ALI_REGION', ''),
bucket: env('ALI_BUCKET', ''),
prefix: env('ALI_PREFIX', ''),
cdn: env('ALI_CDN_URL', ''),
},
},
},
});