Node.js - bucket.file.exists()

Determine if a file exists in a bucket.

This API method is available from Release v0.16.0 and later.
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()
Last updated on Dec 5, 2024