Answers for "javascript get file type from string"

7

javascript find file extension from string

var ext =  fileName.split('.').pop();
Posted by: Guest on March-04-2020
0

how to get file type in javascript

function showType(fileInput) {
  var files = fileInput.files;

  for (var i = 0; i < files.length; i++) {
    var name = files[i].name;
    var type = files[i].type;
    alert("Filename: " + name + " , Type: " + type);
  }
}
Posted by: Guest on October-25-2021

Code answers related to "javascript get file type from string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language