Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form-data overwriteRequestBody used with file upload doesn't inject "src" into collection. #501

Open
bpogy opened this issue Jul 27, 2023 · 2 comments

Comments

@bpogy
Copy link

bpogy commented Jul 27, 2023

for File Upload, i have the following overwrite:
"overwriteRequestBody": [ { "key": "reqFile", "value": "/mytestfile.txt", "insert": true } ]

Postman expects this request to look like this:

"body": { "mode": "formdata", "formdata": [ { "key": "reqFile", "type": "file", "src": "/mytestfile.txt" } ] },

instead, generated collection has the following:
"body": { "mode": "formdata", "formdata": [ { "key": "reqFile", "type": "file" }, ] }

This presents a problem since Postman doesn't recognize the second object as valid and there is no source for file upload.

Attempts with the following config also fail to insert "src" into a collection:
"overwriteRequestBody": [ { "key": "reqFile", "value": "/mytestfile.txt", "insert": true, "overwrite": true } ]

@bpogy bpogy changed the title formdata overwrite creates a new object instead of updating existing overwriteRequestBody with formdata for file upload doesn't inject "src" into collection Jul 27, 2023
@bpogy bpogy changed the title overwriteRequestBody with formdata for file upload doesn't inject "src" into collection form-data overwriteRequestBody used with file upload doesn't inject "src" into collection. Aug 3, 2023
@vampyar
Copy link

vampyar commented Aug 23, 2024

Hi @thim81 can you look it case, because I'm want using multipart data format for request in the my openapi doc, how we can do it ?

image

@thim81
Copy link
Collaborator

thim81 commented Aug 23, 2024

hi @vampyar

Can you share this POST vehicles openapi request?
And how this should look like in Postman, and share the exported Postman collection (if possible)?

So we can see the generated current result and expected result, to figure out how we could implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants