code: function createFilenameHash(uploadDir, files) {
      let hashPath = path.resolve(uploadDir, 'name.json');
      let hashContent;
      let result = [];
  
      if (hashFileExist || fs.existsSync(hashPath)) {
        try {
          let content = fs.readFileSync(hashPath, 'utf8');
          hashContent = JSON.parse(content);
        } catch (err) {
          debug('get hash file failed:' + err);
        }
      } else {
        hashContent = {};
      }
  
      for (let item in files) {
        let fileName = files[item].name;
        let hashName = getUniqueId(0, hashContent, fileName);
  
        let fileItem = getFileItem(files[item], uploadDir)
        hashContent[hashName] = fileItem;
        result.push(util._extend(fileItem, {
          filename: hashName
        }))
      }
  
      try {
        let file = JSON.stringify(hashContent, null, 2);
        fs.writeFileSync(hashPath, file);
      } catch (err) {
        debug('write hash file failed:' + err);
      }
  
      hashFileExist = true;
  
      return result;
    }
docs: 创建文件名及对应文件的hash
  @param  {String} uploadDir 文件保存路径
  @param  {Obejct} files     文件配置