Skip to content

IFormFile is not working with Swagger, but If i change to byte[] it is working #682

@logeshpalani33

Description

@logeshpalani33

Describe the issue
I can't use IFormFile in Swagger, we are using IFormFile in many places, so i just don't want to change into byte[]. can you suggest me some alternative configuration ways to fix this.

To Reproduce
Steps to reproduce the behavior:

public class PostRequestDto
{
    public Guid id { get; set; } = Guid.Empty;
    public string title { get; set; }
    public string description { get; set; }
    public IFormFile? image { get; set; }
    public string isActive { get; set; }
    public string createdBy { get; set; }
    public DateTime? createdTime { get; set; }
}

Expected behavior
Excepted to load the Swagger UI, it throws "Index out of range"

Image

Screenshots
If applicable, add screenshots to help explain your issue.

Environment (please complete the following information, if applicable):

  • OS: [e.g. Mac]
  • Browser Chrome, Safari]
  • Version [V3]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions