Node.js - bucket.file.exists()

Determine if a file exists in a bucket.

import { bucket } from '@nitric/sdk'
const assets = bucket('assets').allow('read')
const exists = await assets.file('images/logo.png').exists()

Examples

Determine if a file exists

import { bucket } from '@nitric/sdk'
const assets = bucket('assets').allow('read')
const exists = await assets.file('images/logo.png').exists()
Last updated on Oct 14, 2024