From 1d1cb9617e93a2aff292f3e85d99b3db906ef546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E9=A3=9E?= Date: Thu, 11 Jan 2024 15:04:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/oss.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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)