diff --git a/src/utils/oss.js b/src/utils/oss.js index a22ee9c7..4c88c6b4 100644 --- a/src/utils/oss.js +++ b/src/utils/oss.js @@ -19,13 +19,9 @@ function blobToBuffer(blob, fileName) { async function ossGenerateSTS() { let res = await GetObjectStoreToken() - let ObjectStoreUse = 'AWS' - // Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] } - Vue.prototype.OSSclientConfig = { ...res.Result[ObjectStoreUse] } + Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] } Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint - // let minioClient = new Minio.Client(Vue.prototype.OSSclientConfig); - // switch (res.Result.ObjectStoreUse) { - switch (ObjectStoreUse) { + switch (res.Result.ObjectStoreUse) { case 'AliyunOSS': Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName Vue.prototype.OSSclient = new OSS(Vue.prototype.OSSclientConfig)