// A file already in the account's Object Storage: nothing is uploaded again.
await brand.assets.add({ cloud: "Brand/storefront.jpg", role: "hero" });
// Or bytes, like a logo.
await brand.assets.add({ name: "team.jpg", content: bytes, role: "team", description: "The roasting team" });
brand.assets.last; // the resource just added, with its url
brand.assets.lastCredits; // what its description cost
brand.assets.byRole("hero");# A file already in the account's Object Storage: nothing is uploaded again.
brand.assets.add({"cloud": "Brand/storefront.jpg", "role": "hero"})
# Or bytes, like a logo.
brand.assets.add({"name": "team.jpg", "content": image_bytes, "role": "team", "description": "The roasting team"})
brand.assets.last # the resource just added, with its url
brand.assets.last_credits # what its description cost
brand.assets.by_role("hero")角色
hero、place、interior、product、team、work、detail、texture 或 other。
没有描述的照片会被自动描述
由一个模型撰写描述,约花费 1 个积分,以便代理或页面无需查看图片就能选出合适的那张。自行提供 description,或设置 describe: false,则不产生任何费用。同一文件添加两次会被复用:lastReused 会说明这一点。