Skip to content

Commit

Permalink
modify configMap file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyongyue committed Jun 10, 2020
1 parent 2283b02 commit 08666c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/view/configuration/map/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ export default {
// 上传文件的from的键为文件名
for (let i = 0; i < this.formDynamicKV.files.length; i++) {
let item = this.formDynamicKV.files[i]
formData.append(item['fileName'], item['fileObject'])
fileName.push(item['fileName'])
if (item['fileName']) {
formData.append(item['fileName'], item['fileObject'])
fileName.push(item['fileName'])
}
}
// 给后端传递文件名,以便后端通过键值获取文件内容
formData.append('fileName', JSON.stringify(fileName))
Expand Down

0 comments on commit 08666c4

Please sign in to comment.