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

Unable to use IFormFile with ApiController in 2.1 #3403

Closed
mitchellj opened this issue Aug 9, 2018 · 1 comment
Closed

Unable to use IFormFile with ApiController in 2.1 #3403

mitchellj opened this issue Aug 9, 2018 · 1 comment

Comments

@mitchellj
Copy link

mitchellj commented Aug 9, 2018

When we are trying to use IFormFile it works perfectly when we are not using [ApiController], as soon as we introduce ApiController one of two things happens

  1. If we do not prefix with [FromForm] we get a Serialization exception which generates a Bad Request response.
  2. If we do prefix FromForm to the IFormFile then it becomes null

In order to get IFormFile to work we need to remove ApiController completely in which case the IFormFile becomes completely propagated correctly.

@Eilon
Copy link
Member

Eilon commented Aug 22, 2018

This issue was moved to aspnet/Mvc#8311

@Eilon Eilon closed this as completed Aug 22, 2018
@dotnet dotnet locked and limited conversation to collaborators Aug 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants