0
list_versions: async (bucket, key) => {
    const params = {
      Bucket: bucket,
      Prefix: key
    };
    const listObjectVersionsPromise = s3.listObjectVersions(params).promise();
    await listObjectVersionsPromise
      .then((data) => {
        return data;
      })
      .catch((err) => {
        console.log(err.stack);
      });
  }

If i print the outcome it is showing "undefined" what might be the problem.

0 Answers0