Node.js - bucket.file.delete()

This is reference documentation for the Nitric Node.js SDK. To learn about Buckets and Storage in Nitric start with the Storage docs.

Delete a file from a bucket.

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

Examples

Delete a file

import { bucket } from '@nitric/sdk'
const assets = bucket('assets').allow('delete')
const logo = assets.file('images/logo.png')
await logo.delete()
Last updated on Apr 3, 2025