Node.js - bucket.file.write()

Write a file to a bucket.

import { bucket } from '@nitric/sdk'
const assets = bucket('assets').for('writing')
const logo = assets.file('images/logo.png')
await logo.write(someImageData)

Parameters

  • Name
    data
    Required
    Required
    Type
    Uint8Array
    Description

    The data to write to the file.

Examples

Write a file

import { bucket } from '@nitric/sdk'
const assets = bucket('assets').for('writing')
const logo = assets.file('images/logo.png')
await logo.write(someImageData)
Last updated on Dec 24, 2024