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.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 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) |
--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 to use when inserting the asset into content. |
--folder-id | The 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-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 |
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini.