Skip to content

Failing to validate files of type woff2, eot and ttf #523

Open
@kontur

Description

@kontur

When I try to validate webfont uploads I get an error Trying to upload a file with mime type which is not allowed. Upon further inspecting, I found that for those types (not for woff2 or svg, though) the file.type attribute shows as undefined when setting a breakpoint in src/modules/file.js#L90

My setup code for woff2 (working) and woff (not working) is the same, like so:

<input type="file" name="woff2" data-validation="mime" data-validation-allowing="woff2">
<input type="file" name="woff" data-validation="mime" data-validation-allowing="woff">

I can reproduce this (both woff validating correctly and woff2 failing to validate correctly) on Mac in Chrome Version 54.0.2840.71 and Opera 41.0.2353.46.
Safari Version 10.0.1 (12602.2.14.0.7) does apparently accept any file without validation at all.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions