Sign inGet Started

bird assets upload

Usage

Contoh kode
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 in the same workspace returns its active 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

Contoh kode
# 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 static WebP, up to 5 MiB (5,242,880 bytes). Every image is re-encoded. Static WebP becomes JPEG or PNG; animated GIF keeps its animation. Animated WebP is not supported. Video (MP4, WebM, QuickTime), audio (MP3, M4A, Ogg, WAV), and PDF: up to 25 MB, validated for container structure and stored byte-for-byte. Validation does not scan for malware. (required)
--nameA display name for the asset. Defaults to the uploaded file's name when omitted or empty after trimming.
--alt-textDefault alternative text to use when inserting the asset into content.
--folder-idThe folder to file the asset in. Omit it to place the asset at the top level of the library. Must name an existing folder even when the upload matches an active asset in this workspace. A duplicate keeps its existing folder.
--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