diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index ef4f21e5ed..f5f6880cc5 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -67,6 +67,19 @@ }); } } + if (item && item.files) { + item.files.forEach(fileItem => { + if (fileItem.file) { + if (!fileItem.id) { + let fileId = getUUID().substring(0, 12); + fileItem.name = fileItem.file.name; + fileItem.id = fileId; + } + obj.bodyUploadIds.push(fileItem.id); + bodyUploadFiles.push(fileItem.file); + } + }); + } }, recursiveFile(arr, bodyUploadFiles, obj) { arr.forEach(item => { @@ -86,6 +99,11 @@ this.recursiveFile(item.hashTree, bodyUploadFiles, obj); } }) + if (request.variables) { + request.variables.forEach(item => { + this.setFiles(item, bodyUploadFiles, obj); + }) + } return bodyUploadFiles; }, run() {