MIME type of file returning empty in javascript on some machines

前端 未结 2 662
感情败类
感情败类 2021-01-04 22:37

I have a javascript snippet written which checks for the mime type of the files.

var type = this.files[0].type;

Code was running fine for a long

2条回答
  •  臣服心动
    2021-01-04 23:31

    Finally, i got the answer for my question and here is reason why this was happening on some machines.

    As i was expecting, issue is system specific where content-type for .csv type is missing under Registry (HKEY_CLASSES_ROOT.csv).

    See screenshot, This entry was missing on some machines.

提交回复
热议问题