Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
915c7c88fb
|
@ -18,7 +18,6 @@ async function ossGenerateSTS() {
|
||||||
let res = await GetObjectStoreToken()
|
let res = await GetObjectStoreToken()
|
||||||
// res.Result.ObjectStoreUse = 'AWS';
|
// res.Result.ObjectStoreUse = 'AWS';
|
||||||
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
|
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
|
||||||
console.log(Vue.prototype.OSSclientConfig);
|
|
||||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
||||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
||||||
switch (res.Result.ObjectStoreUse) {
|
switch (res.Result.ObjectStoreUse) {
|
||||||
|
@ -60,7 +59,6 @@ async function ossGenerateSTS() {
|
||||||
const { file, path } = data;
|
const { file, path } = data;
|
||||||
if (!file || !path) return reject('file and path be required');
|
if (!file || !path) return reject('file and path be required');
|
||||||
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
|
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
|
||||||
console.log(config, 'config')
|
|
||||||
if (config) {
|
if (config) {
|
||||||
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
|
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
|
||||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
|
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
|
||||||
|
@ -80,7 +78,7 @@ async function ossGenerateSTS() {
|
||||||
if (res) {
|
if (res) {
|
||||||
resolve({
|
resolve({
|
||||||
name: data.path,
|
name: data.path,
|
||||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + res.name
|
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(res.name)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
reject()
|
reject()
|
||||||
|
|
Loading…
Reference in New Issue