For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.
Checks the existence of a file.
This reads the object's metadata, so the result is false only when Storage reports that the key does not exist: an error with code NoSuchKey, or an HTTP 404 with no error code. In that case data is false and error holds the original error.
Every other failure throws instead of returning false, including an invalid or expired JWT (InvalidJWT), a missing bucket (NoSuchBucket) and network errors. With throwOnError(), a missing key throws as well.
The file path, including the file name. For example `folder/image.png`.
const { data, error } = await supabase
.storage
.from('avatars')
.exists('folder/avatar1.png')