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

Add a sample for describing a multipart/form-data endpoint for file uploads #18

Closed
trevonmckay opened this issue Dec 23, 2020 · 12 comments · Fixed by #224
Closed

Add a sample for describing a multipart/form-data endpoint for file uploads #18

trevonmckay opened this issue Dec 23, 2020 · 12 comments · Fixed by #224
Labels
enhancement New feature or request v0.9.0

Comments

@trevonmckay
Copy link

I'm not sure what the bodyType would be for an endpoint that accepts multipart/form-data using the OpenApiRequestBodyAttribute.

@justinyoo
Copy link
Contributor

It's not currently supported yet, but it will be implemented.

@justinyoo
Copy link
Contributor

@agravity-philipp
Copy link

Any update on this? I would really need it :)

@klaudiaknafel
Copy link

Are there any updates on when it will be implemented?

@ParimalPa
Copy link

We are in need of this - when would this be available?

@justinyoo justinyoo linked a pull request Sep 3, 2021 that will close this issue
@agravity-philipp
Copy link

Why is this issue closed? Of course, with 0.9.0-preview you support now byte[] and multiform/form-data. But the issue was created to ask for a sample how to use it.
I was searching a lot, but still I could not find any documentation on how to use this with OpenApiRequestBody. Especially when I want to add a file and some more parameters ("name": string, "customId": string).
Would you please provide a sample or link to the documentation?
Thanks!

@justinyoo
Copy link
Contributor

@agravity-philipp Good point! I'll update the content for it.

@agravity-philipp
Copy link

Thank you @justinyoo - how will I know when this will be available?

@justinyoo
Copy link
Contributor

Soon! In the meantime, please find this repo as an example: https://github.com/devkimchi/azure-functions-binary-data-via-swagger-ui

This sample app will be used for the document.

@rtellez91
Copy link

Hi @justinyoo, thanks for your example. I think is missing one for multiple file uploads. I changed the model type from FileModel to List but it shows the ui as the Content-Type was json. Is there any way to make it work?

@Nikhil-RT
Copy link

Hi @justinyoo, may I know if "Content-Type" : "multipart/form-data" supported for azure rest api's ....?

@Vivekv11
Copy link

Hi @justinyoo, do you have any updates regarding the issue with uploading multiple files? Currently, when providing byte[] it only populates one file upload section in swagger. Is there a possibility to use IFormFile or IFormFileCollection instead of byte[]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v0.9.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants