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.pdfOptions
Request
| Name | Description |
|---|---|
--dry-run | Print the resolved request without sending it, then exit |
--idempotency-key | Deduplication key; a retry with the same key won't act twice |
Options
| Name | Description |
|---|---|
--file | The 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) |
--name | A display name for the asset. Defaults to the uploaded file's name when omitted or empty after trimming. |
--alt-text | Default alternative text describing the asset, carried along whenever it is placed. |
--folder-id | The 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-schema | Print the fields this command returns, then exit |
Related
| Name | Description |
|---|---|
bird assets delete | Remove an asset from the media library |
bird assets get | Get a media-library asset by ID |
bird assets list | List workspace media-library assets |
bird assets update | Update asset metadata or folder placement |
Related resources
Continue with the documentation, guides and examples for this topic.