Nitric logo

Storage

bucket.file.delete()

Deletes a file within a bucket.

from nitric.resources import bucket

# Create a reference to an 'assets' bucket with permissions to delete
assets = bucket('assets').allow('deleting')

logo = assets.file('images/logo.png')

await logo.delete()

Examples

Delete a file

from nitric.resources import bucket

assets = bucket('assets').allow('deleting')

logo = assets.file('images/logo.png')

await logo.delete()
Previous
file.write()