新版上传

uat_us
熊飞 2024-01-11 15:04:12 +08:00
parent 95f68a1fb1
commit 1d1cb9617e
1 changed files with 2 additions and 6 deletions

View File

@ -19,13 +19,9 @@ function blobToBuffer(blob, fileName) {
async function ossGenerateSTS() { async function ossGenerateSTS() {
let res = await GetObjectStoreToken() let res = await GetObjectStoreToken()
let ObjectStoreUse = 'AWS' Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
// Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
Vue.prototype.OSSclientConfig = { ...res.Result[ObjectStoreUse] }
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
// let minioClient = new Minio.Client(Vue.prototype.OSSclientConfig); switch (res.Result.ObjectStoreUse) {
// switch (res.Result.ObjectStoreUse) {
switch (ObjectStoreUse) {
case 'AliyunOSS': case 'AliyunOSS':
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
Vue.prototype.OSSclient = new OSS(Vue.prototype.OSSclientConfig) Vue.prototype.OSSclient = new OSS(Vue.prototype.OSSclientConfig)