class Uploader {
  constructor(uploadFunc) {
    this.uploadFunc = uploadFunc;
  }
  upload(file) {
    return new Promise((resolve, reject) => {
      this.uploadFunc(file, ({ data, error }) => {
        if (error) {
          reject(error);
        } else {
          resolve({ data });
        }
      });
    });
  }
}
export {
  Uploader
};
//# sourceMappingURL=uploader.js.map
