Skip to content

"accept" validator not working on application/epub+zip mimetype #1243

Closed
@virgiliu

Description

@virgiliu

A validation rule like the following will fail validation even if the mimetype is the correct one:

    'epub_file':
    {
      required: true,
      accept: "application/epub+zip"
    }

The file I used to test is Orwell's "Animal Farm" from https://www.epubbooks.com/book/1074/animal-farm

After selecting the file and validation failed I ran the following:

document.getElementById('input-epub-upload').files[0]['type']

The output was:

"application/epub+zip"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions