Node.js - bucket.file.read()

Read 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.read()

Examples

Read a file

import { bucket } from '@nitric/sdk'

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

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

const logoData = await logo.read()