code: function getSuffix(url) {
      var lastIndex = url.lastIndexOf('.');
      if (lastIndex == -1) {
          console.log('[error] path do not inclue a file name:', url);
          return;
      }
  
      return url.substring(lastIndex);
  }
docs: 获取文件的后后缀名