sprd/type/UploadDesign.js
function (fileName) {
            fileName = (fileName || "").toLowerCase();
            var validExtensions = ["svg", "cdr", "eps", "ai"],
                fileExtension = fileName.substr(fileName.lastIndexOf('.') + 1);

            return validExtensions.indexOf(fileExtension) != -1;
        }
function (fileName) {
            fileName = (fileName || "").toLowerCase();
            var validExtensions = ["svg", "cdr", "eps", "ai"],
                fileExtension = fileName.substr(fileName.lastIndexOf('.') + 1);

            return validExtensions.indexOf(fileExtension) != -1;
        }
function ( fileName ) { fileName = ( fileName || "" ) . toLowerCase ( ) ; var validExtensions = [ "svg" , "cdr" , "eps" , "ai" ] , fileExtension = fileName . substr ( fileName . lastIndexOf ( '.' ) + 1 ) ; return validExtensions . indexOf ( fileExtension ) != - 1 ; }
Checks if the file name matches a correct extension for a vector file.

@param {String} fileName
@returns {boolean}
Checks if the file name matches a correct extension for a vector file .