Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Unable to use IFormFile with ApiController in 2.1 #8311

@Eilon

Description

@Eilon

From @mitchellj on Thursday, 09 August 2018 20:06:10

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.

Copied from original issue: dotnet/aspnetcore#3403

Metadata

Metadata

Assignees

Labels

3 - Donebugcost: XSWill take up to half a day to complete

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions