alicli documentation

media get

media get

Read attachment bytes already cached by a pull.

alicli media get "mr-0000000000000000" --out attachment.bin --json
alicli media get "mr-0000000000000000" --json

This is a local read. With --out, bytes are written to that path and the JSON result names the path, byte count and content type. Without it, JSON includes base64; human output only describes the cache entry.

A cache miss is not a missing file

Pull fetches references the feed exposes. Failed media requests do not roll back messages. Check media gap to distinguish a rejected preview wrapper from a missing fetchable reference. Use media original for supported PDF and Office originals, or media render for a separate rendered preview.

The cache accepts image, video, audio and several application content types. A file’s presence is not a universal content validation guarantee. Keep the reported content type, and treat downloaded files as untrusted input. An existing output file can be overwritten.

media original · media render · media gap · pull