Solution 1 :

Try this for JS.

    <form action="">
    <label for="file">Select file:</label>
    <input type="file" name="file" accept="text/js">

Info on accept

Configuring server MIME types

MIME types

Problem :

HTML input type=”file” event doesn’t detect ttf, otf, or js, how do I change that? I would like to have mime types working from the start.


Comment posted by Quinn Keaveney

I’m not looking to support accept. I want ttf and otf to be reflected in the mime type.

Comment posted by……