1
continuous-integration/drone/push Build is passing Details

main
caiyiling 2026-04-02 17:37:24 +08:00
parent 478adcde21
commit e30fb2a041
1 changed files with 4 additions and 3 deletions

View File

@ -23,9 +23,6 @@ async function ossGenerateSTS() {
res = await GetObjectStoreToken() res = await GetObjectStoreToken()
localStorage.setItem('stsToken', JSON.stringify(res)) localStorage.setItem('stsToken', JSON.stringify(res))
} }
const urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId')
// res.Result.ObjectStoreUse = 'AWS'; // res.Result.ObjectStoreUse = 'AWS';
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] } Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse; Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
@ -56,6 +53,8 @@ async function ossGenerateSTS() {
} }
let res = await OSSclient.put(objectName, object) let res = await OSSclient.put(objectName, object)
if (res && res.url) { if (res && res.url) {
const urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) { if (Object.keys(fileInfo).length !== 0) {
let params = Object.assign({path: objectName}, fileInfo) let params = Object.assign({path: objectName}, fileInfo)
addOrUpdateFileUploadRecord(params) addOrUpdateFileUploadRecord(params)
@ -106,6 +105,8 @@ async function ossGenerateSTS() {
} }
let res = await customerHttp(OSSclient, data, progress); let res = await customerHttp(OSSclient, data, progress);
if (res) { if (res) {
const urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) { if (Object.keys(fileInfo).length !== 0) {
let params = Object.assign({path: data.path}, fileInfo) let params = Object.assign({path: data.path}, fileInfo)
addOrUpdateFileUploadRecord(params) addOrUpdateFileUploadRecord(params)