How do I get the mime-type of apk when firefox uploads a file?

is currently uploading files.
needs to limit the file type to apk.

The

principle is an input. After the change event is triggered, the file is read, the type attribute is obtained, and the file type is judged according to the mime-type
. But in the latest version of Firefox (firefox), it is found that Firefox cannot get type, which is an empty string

.

chrome can be obtained.

is this person the bug of the browser? is there any workaround?

html

<input type="file" name="img" class="input1">

js

var file=document.querySelector(".input1");
file.onchange=function(e){
    console.log(this.files[0]);//ff  apk type 
}
May.27,2022
Menu