Skip to main content
To walk every page without managing Page yourself, use ListAllMedia.

Signature

Pass nil for the first page with default settings.

ListMediaOptions

Returns

Each listed asset fills ID, Filename, URL, Type (MIME type), SizeBytes, AssetType ("image", "video" or "file"), Folder, FolderID and CreatedAt. Read SizeBytes with .Int64(). Pass an item’s ID straight to URL to transform it:

Filtering by folder

An unknown folder path returns a 400 (dreep.IsInvalidRequest), so a typo doesn’t look like an empty folder. Only assets with status ready are listed, newest first, so a presigned upload that hasn’t been confirmed won’t appear.