Skip to content

FileFormatInspector overload with File Extension #48

@amitpercept

Description

@amitpercept

I think it would be good that FileFormatInspector should have one more overload with File Extension as parameter wherein we can pass in the allowed extensions (".jpg, .txt, .xls, .doc, .pdf") in the application and it will check based on those extensions. The problem with File Format is that we have to use several if conditions to check for the allowed extensions (which are sometimes stored either in database or in configuration). Something like this:

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/models/file-uploads/samples/3.x/SampleApp/Utilities/FileHelpers.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions