Skip to content

Commit

Permalink
fix: formdata send value error
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed Mar 10, 2023
1 parent 68772f7 commit 8d5736c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ export class ApiTestBodyComponent implements OnInit, OnChanges, OnDestroy {
return;
}
transferFileToDataUrl(file).then((result: { name: string; content: string }) => {
this.model = {
name: file.name,
dataUrl: result.content
};
this.model = [
{
name: file.name,
dataUrl: result.content
}
];
this.binaryFiles = [
{
uid: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export abstract class TestServerService implements TestServer {
//@ts-ignore
files: val.files?.map(file => file.content),
paramType: val.dataType === ApiParamsType.file ? '1' : '0',
paramInfo: val['paramAttr.example']
paramInfo: val.paramAttr?.example || ''
}));
}
}
Expand Down

0 comments on commit 8d5736c

Please sign in to comment.