Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-09-05 13:39:14 +08:00
commit 915c7c88fb
1 changed files with 1 additions and 3 deletions

View File

@ -18,7 +18,6 @@ async function ossGenerateSTS() {
let res = await GetObjectStoreToken()
// res.Result.ObjectStoreUse = 'AWS';
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
console.log(Vue.prototype.OSSclientConfig);
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
switch (res.Result.ObjectStoreUse) {
@ -60,7 +59,6 @@ async function ossGenerateSTS() {
const { file, path } = data;
if (!file || !path) return reject('file and path be required');
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
console.log(config, 'config')
if (config) {
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
@ -80,7 +78,7 @@ async function ossGenerateSTS() {
if (res) {
resolve({
name: data.path,
url: Vue.prototype.OSSclientConfig.viewEndpoint + res.name
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(res.name)
})
} else {
reject()