MIME type of file returning empty in javascript on some machines

前端 未结 2 657
感情败类
感情败类 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:20

    I also have the same problem with csv files with my Angular 8 application. The problem is only on the machine where Excel is not installed, so the csv key in the registry HKEY_CLASSES_ROOT is missing, as said by money user up here.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题