Sign inGet Started

bird assets upload

Usage

Code example
bird assets upload [flags]

Description

Create a media-library asset

Uploads bytes to a permanent public URL. Images are re-encoded; other formats retain their bytes. An identical file returns the existing asset unchanged, including its folder. Replacing content requires a new upload.

Pass the file with --file ("-" reads stdin); any other fields are flags. Run --dry-run to print the parts that would be sent, including the file's path and size, without uploading it.

Examples

Code example
# check what would be sent, without sending it
bird assets upload --file ./document.pdf --dry-run

# upload it
bird assets upload --file ./document.pdf

Options

Request

NameDescription
--dry-runPrint the resolved request without sending it, then exit
--idempotency-keyDeduplication key; a retry with the same key won't act twice

Options

NameDescription
--fileThe file to upload. The file's contents determine its type; a declared content type is ignored. Images: PNG, JPEG, GIF, or WebP, up to 5 MB. WebP is converted on upload, and every image is re-encoded. Video (MP4, WebM, QuickTime), audio (MP3, M4A, Ogg, WAV), and PDF: up to 25 MB, stored byte-for-byte. (required)
--nameA display name for the asset. Defaults to the uploaded file's name when omitted or empty after trimming.
--alt-textDefault alternative text describing the asset, carried along whenever it is placed.
--folder-idThe folder to file the asset in. Omit it to place the asset at the top level of the library. Ignored when the upload matches an existing asset, which is returned where it already sits.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird assets deleteRemove an asset from the media library
bird assets getGet a media-library asset by ID
bird assets listList workspace media-library assets
bird assets updateUpdate asset metadata or folder placement

Continue with the documentation, guides and examples for this topic.