Nitric logo

Storage

bucket.file.get()

Get the contents of a file from a bucket.

import { bucket } from '@nitric/sdk';

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

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

const logoData = await logo.get();

Examples

Get a file

import { bucket } from '@nitric/sdk';

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

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

const logoData = await logo.get();
Previous
bucket.files()