oss-upload.js
389 Bytes
// const OSS = require('ali-oss')
let Config = require('./ossConfig.json')
let creds = {
region: Config.region,
accessKeyId: Config.accessKeyId,
accessKeySecret: Config.accessKeySecret,
bucket: Config.bucket,
secure: true
}
export const client = new OSS.Wrapper(creds)
export function getAliOSSCreds() {
return new Promise((resolve, reject) => {
resolve(creds);
});
}