临时凭证获取
parent
fa395f54b2
commit
0f29a2971c
|
@ -15,7 +15,14 @@ Vue.prototype.OSSclientConfig = {
|
|||
|
||||
|
||||
async function ossGenerateSTS() {
|
||||
let res = await GetObjectStoreToken()
|
||||
let res = null;
|
||||
if (localStorage.getItem('stsToken')) {
|
||||
res = JSON.parse(localStorage.getItem('stsToken'))
|
||||
} else {
|
||||
res = await GetObjectStoreToken()
|
||||
localStorage.setItem('stsToken', JSON.stringify(res))
|
||||
}
|
||||
|
||||
// res.Result.ObjectStoreUse = 'AWS';
|
||||
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
|
||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
||||
|
|
Loading…
Reference in New Issue