临床数据上传pdf文件名称添加时间戳

uat_us
caiyiling 2024-04-01 15:17:29 +08:00
parent 51c59a7be9
commit 990c152a99
1 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,8 @@ export default {
this.addFileList = []
for (var i = 0; i < this.selectArr.length; ++i) {
const file = await this.fileToBlob(this.selectArr[i])
const res = await this.OSSclient.put(`/${this.trialId}/ClinicalData/${this.selectArr[i].name}`, file)
var timestamp = Date.now()
const res = await this.OSSclient.put(`/${this.trialId}/ClinicalData/${timestamp}${this.selectArr[i].name}`, file)
this.addFileList.push({ fileName: this.selectArr[i].name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
}
this.saveClinicalData()