Need to fix today. I get error (File type'.jpg' is not supported as an image!) when ever I select image which is actually jpg so i know the problem is with this code but i don't see where. Can you guys tell me where you think the problem is in this js file.Thanks, if(myMimeType != null) { if(fileType != null) { var extension = fileType.match(/.*\.(.*)/)[1]; extension = extension.toLowerCase(); // set the mimeType myMimeType.setValue(globalImageTypes[extension]); if (myMimeType.getValue() == "") { alert ("File type '." + extension + "' is not supported as an image!"); return false; } // set the extension field if(ext != null) { ext.setValue(extension); } else { alert ("File-Extension is empty!"); return false; } } else { alert("Image-Type is not defined!"); return false; } } return true;
jpg
.jpg
.
globalImageTypes