code: function upload(filesPaths) {
    const promises = filesPaths.map((v, i) => {
      const file = fs.createReadStream(v)
      const formData = {
        projectName: 'FrontEndResource',
        files: [file],
        path: 'frontend',
        usrName: '飞鱼籽',
      };
      return new Promise((resolve, reject) =>
        request.post({
          url: 'http://upload.2dfire-daily.com/upfileandlist',
          formData,
        }, function (error, response, body) {
          if (!error) {
            if (response.statusCode == 200) {
              try {
                const obj = JSON.parse(body)
                resolve({ file: v, response: obj })
                // console.log('success');
              } catch (error) {
                console.error(error);
              }
            } else {
              console.error('upload failed:', response.statusCode);
              reject()
            }
          } else {
            console.error('upload failed:', err);
            reject()
          }
        })
      )
    })
  
    return Promise.all(promises)
      .then((posts) => posts)
      .catch((e) => { console.error(e) });
  }
docs: const async = require('async') 
  不会按顺序上传