fix: invalid file path in shell-curl (#2855)

This commit is contained in:
Chae Jeong Ah 2024-08-19 21:48:39 +09:00 committed by GitHub
parent 017d2235b8
commit a1783c46ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,11 @@ const createPostData = (body) => {
mimeType: contentType,
params: body[body.mode]
.filter((param) => param.enabled)
.map((param) => ({ name: param.name, value: param.value }))
.map((param) => ({
name: param.name,
value: param.value,
...(param.type === 'file' && { fileName: param.value })
}))
};
} else {
return {