docs: function uploadRequest(res, fileObject, showProgress) {
    var url = res.url;
    var expiration = res.expiration;
    var hmac = res.hmac;
    var uuid = res.uuid;
    var file = fileObject.file;
    var uid = fileObject.uid;
  
    var upload_url = buildUploadURL(url, uuid, expiration, hmac, file.name);
  
    return new Promise(function (resolve, reject) {
      reqs[uid] = _superagent2.default.put(upload_url).send(file).set({
        'Accept': 'application/json',
        'Content-Type': 'application/json'
      }).on('progress', function (e) {
        showProgress(e, fileObject);
      }).end(function (err, res) {
        delete reqs[uid];
  
        // throw a custom error message
        if (err) return reject(customError('uploadRequest', err));
  
        resolve(res);
      });
    });
  }