This topic describes how to determine whether an object exists.

Use get to determine whether an object exists:

client.get(object).then((result) => {
      if (result.res.status == 200) {
        return true
      }
  }).catch((e)=> {
    if (e.code == 'NoSuchKey') {
      return false
    }
  })
Note For more information about the use of get, see Download an object.