Node.js - bucket.file.exists()

Determine if a file exists in a bucket.

import { bucket } from '@nitric/sdk'

const assets = bucket('assets').for('reading')

const exists = await assets.file('images/logo.png').exists()

Examples

Determine if a file exists

import { bucket } from '@nitric/sdk'

const assets = bucket('assets').for('reading')

const exists = await assets.file('images/logo.png').exists()