question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support IFormFile using Swashbuckle

See original GitHub issue

Swashbuckle.AspNetCore version 4.0.0 implemented file upload when using IFormFile (you can read more about it here). I am unsure if this a template or aspnetboilerplate issue, but I already spent 6 hours trying to make it work with no success.

Has anyone been able to make it work or could point me in a direction?

Besides that, could anyone give me a suggestion as an alternative to implement file upload when working with angular + AppServices? The tutorials I found online don’t work well with nswag typescript generator.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ismcagdascommented, Jun 26, 2019

I compared this template with AspNet Zero and this seems like it might create a difference and trying it solved the problem 😄

1reaction
ismcagdascommented, Jun 10, 2019

@vdurante thanks a lot for your detailed explanation, I will check it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get a upload button in swagger for IFormFile ...
In ASP.NET Core Web API, it binds application/json format data by default. But what your model need is multipart/form-data type data.
Read more >
Testing file upload with Swagger in ASP.Net core
IFormFile file = HttpContext.Request.Form.Files[0]; _logger.LogInformation(file.FileName); // we can put rest of upload logic here.
Read more >
WithOpenApi IFormFile support is not generating valid ...
Microsoft.AspNetCore.Http.BadHttpRequestException: Required parameter "IFormFile file" was not provided from form file. Although this actually ...
Read more >
Better file upload integration with Swagger on Minimal APIs
These framework provided interfaces IFormFile to upload a file and handle it server-side and IFormFileCollection to handle several files.
Read more >
File Upload via Swagger
NET Core Web API” by Talking Dotnet (link, 2017) on this topic. ... Swashbuckle automatically supports the IFormFile data type in the user ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found