-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Multiple file upload via UI #1421
Comments
Seems to be a problem with swagger ui and not nswag. Did you try SwaggerUi3? Is the generated swagger spec correct? Where did you find the last code snippet? |
Yes, spec is correct.
Hm, I`ll look on it today, thanks. |
Same thing with 3rd version. HTTP side doesn`t use "multiple" atribute and if you add it will still send only first file.
|
Maybe you should check with the Swagger UI 3 guys whether this is supported and correct Swagger spec? |
Hi, I try to transfer an array of IFile from Angular to .Net Core. Did you find a way to bind it automatically? here is my Dto Server:
Here is what the browser send: Here is the code generated by nswag:
Here there is a repo where it s possible to upload data and File: https://github.com/fiyazbinhasan/AngularSpaCore In Swagger, the array of IFormFile seems to be manage correctly now: |
I have the same problem as @barmyard. With ApiExplorer my Upload Actions are not detected correctly. Any updates? |
I have the same problem. Any updates??? |
This is actually a swagger-ui issue. Go vote for it by giving a thumbs up: swagger-api/swagger-ui#4600 |
So the generated spec is correct and we have to wait for a swagger ui update? |
I`m shoked that this bug is still exist,,, |
I think so, yes... |
Hi @RicoSuter at this moment the swagger issue just fixed a few days ago. I updated NSwag to 13.6.0. Now the generated swagger.json looks like:
This schema is the same as latest swagger client. However when I use the swagger ui to send request to the sever, I found that the request is like:
The request only sent string '[object file]" instead of the form data that I selected (also, content length is only 157). Hence, any thoughts about it? Thanks! |
I confirm that:
What I use:
So it's fine except using Swagger UI 3 for uploading files. Any workarounds how to make Swagger UI sending correct data? |
Do we need to update Swagger UI 3 in NSwag.AspNetCore? |
Different from |
Looks like it has been fixed here: https://github.com/swagger-api/swagger-ui/releases/tag/v3.26.0 |
I also have still the same problem. I also tried My only solution to get the
|
Is there a way to send multiple files in one request using:
first of all it allows selection of only 1 file.
And after that in file: NSwag.AspNet.Owin/SwaggerUi/swagger-ui.js it just doesn`t add files:
The text was updated successfully, but these errors were encountered: