Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ability to detect whether detect mimetype corresponds to the file extension #338

Open
@C0rn3j

Description

As per #228 (comment), libmagic should be able to do this, but I do not see a way to get this library to give me the list of possible file extensions for a given file type.

Would be nice to have a verify_file_extension() function or something akin to it, but I can write that myself, it's just that I can't get the list at all.

mimetypes library does have a function for this.

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

        AltStyle によって変換されたページ (->オリジナル) /