名称: agentuity-cli-cloud-storage-download 描述: 从存储桶下载文件。需要身份验证。用于Agentuity云平台操作 版本: “0.0.103” 许可证: Apache-2.0 允许工具: “Bash(agentuity:*)” 参数提示: “<名称> <文件名> [输出路径]” 元数据: 命令: “agentuity cloud storage download” 标签: “只读 需要认证”
云存储下载
从存储桶下载文件
前提条件
- 已通过
agentuity auth login认证 - 需要组织上下文(
--org-id或默认组织)
使用方法
agentuity cloud storage download <名称> <文件名> [输出路径] [选项]
参数
| 参数 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
<名称> |
字符串 | 是 | - |
<文件名> |
字符串 | 是 | - |
<输出路径> |
字符串 | 否 | - |
选项
| 选项 | 类型 | 是否必需 | 默认值 | 描述 |
|---|---|---|---|---|
--metadata |
布尔值 | 是 | - | 仅下载元数据(不下载文件内容) |
示例
从存储桶下载文件:
bunx @agentuity/cli cloud storage download my-bucket file.txt
下载文件到指定路径:
bunx @agentuity/cli cloud storage download my-bucket file.txt output.txt
下载文件到标准输出:
bunx @agentuity/cli cloud storage download my-bucket file.txt - > output.txt
仅下载元数据:
bunx @agentuity/cli cloud storage download my-bucket file.txt --metadata
输出
返回JSON对象:
{
"success": "布尔值",
"bucket": "字符串",
"filename": "字符串",
"size": "数字",
"contentType": "字符串",
"lastModified": "字符串"
}
| 字段 | 类型 | 描述 |
|---|---|---|
success |
布尔值 | 下载是否成功 |
bucket |
字符串 | 存储桶名称 |
filename |
字符串 | 下载的文件名 |
size |
数字 | 文件大小(字节) |
contentType |
字符串 | 内容类型 |
lastModified |
字符串 | 最后修改时间戳 |