Skip to content

Commit

Permalink
fix(oas): reelecting base64 encoding by JSON schema
Browse files Browse the repository at this point in the history
closes #181
  • Loading branch information
derevnjuk committed Feb 24, 2023
1 parent 52601e2 commit 759ae63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/oas/src/converter/parts/postdata/BodyConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ export abstract class BodyConverter<T extends OpenAPI.Document>
this.inferContentType(val, propertySchema);

const filenameRequired = this.filenameRequired(contentType);
const base64Encoded = this.BASE64_FORMATS.includes(schema?.format);
const base64Encoded = this.BASE64_FORMATS.includes(
propertySchema?.format
);

const headers = [
`Content-Disposition: form-data; name="${key}"${
Expand Down

0 comments on commit 759ae63

Please sign in to comment.