Skip to content

IDISP001 False Positive with MemoryStream and File Return #535

@ondrejholik

Description

@ondrejholik
var imageStream = new MemoryStream();
return File(imageStream, "image/png");

Should not trigger IDISP001

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.file?view=aspnetcore-7.0&viewFallbackFrom=net-7.0

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