Skip to content
DunSocial Docs

Media

Upload images and videos, then attach them to posts.

Upload local files into the workspace gallery, then pass the returned asset id to posts schedule or posts publish with --media.

Upload

dun media upload ./photo.png
dun media upload ./photo.png --alt "Product screenshot" --json
dun media upload ./clip.mp4 --mime video/mp4

The CLI requests a presigned URL, uploads the file, then completes the asset. Supported types include jpeg, png, gif, webp, mp4, mov, and webm.

List and get

dun media list
dun media get ASSET_ID

Delete

Requires --yes:

dun media delete ASSET_ID --yes

Attach to a post

ID=$(dun media upload ./shot.png --json |)   # use the asset id from JSON
dun posts schedule --text "New shot" --accounts ACCOUNT_ID --media ASSET_ID --in 30m