hunk.code_window:       typeof params.url === 'string' &&
         (typeof params.fields === 'object' || params.fields == null) &&
         (params.method == null || /^(put|post)$/i.test(params.method))
       if (!valid) {
         const err = new TypeError(`AwsS3: got incorrect result from 'getUploadParameters()' for file '${file.name}', expected an object '{ url, method, fields }'.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.`)
         console.error(err)
         throw err
       }
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:       const err = new TypeError(`AwsS3: got incorrect result from 'getUploadParameters()' for file '${file.name}', expected an object '{ url, method, fields, headers }'.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.`)
  
hunk.file_path: src/plugins/AwsS3/index.js
hunk.type: replace
file: /**
   * Wait for multiple Promises to resolve.
   */
  module.exports = class PromiseWaiter {
    constructor () {
      this.promises = []
    }
  
    add (promise) {
      this.promises.push(promise)
  
      const remove = () => {
        this.remove(promise)
      }
      promise.then(remove, remove)
    }
  
    remove (promise) {
      const index = this.promises.indexOf(promise)
      if (index !== -1) {
        this.promises.splice(index, 1)
      }
    }
  
    wait () {
      const promises = this.promises
      this.promises = []
  
      function noop () {
        // No result value
      }
  
      // Just wait for a Promise to conclude in some way, whether it's resolution
      // or rejection. We don't care about the contents.
      function concluded (promise) {
        return promise.then(noop, noop)
      }
  
      return Promise.all(promises.map(concluded)).then(noop)
    }
  }
  