feishu-pdf-uploader

飞书PDF文件上传器 - 将本地PDF文件上传到飞书云盘。 使用飞书OpenAPI的upload_prepare → upload_part → upload_finish流程, 支持大文件分片上传。 Use when uploading PDF or any files to Feishu (Lark) cloud drive. Handles multipart/form-data upload without checksum parameter.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "feishu-pdf-uploader" with this command: npx skills add kimi-claw/feishu-pdf-uploader

Feishu PDF Uploader | 飞书PDF上传器

上传本地PDF文件到飞书云盘。支持任意文件类型,不仅限于PDF。

Upload local PDF files (or any files) to Feishu (Lark) cloud drive.

快速开始 | Quick Start

python3 scripts/upload_pdf.py /path/to/file.pdf --folder-token FOLDER_TOKEN

使用方法 | Usage

命令行

python3 scripts/upload_pdf.py <file_path> [options]

Options:
  --folder-token    目标文件夹token (默认从环境变量读取)
  --app-id          飞书应用ID (默认从config读取)
  --app-secret      飞书应用密钥 (默认从config读取)

Python API

from upload_pdf import upload_file_to_feishu

result = upload_file_to_feishu(
    file_path="/path/to/file.pdf",
    folder_token="VnTdf2MNglfgPtdrhCxcSTdOnZd",
    app_id="cli_xxx",
    app_secret="xxx"
)
# Returns: {"success": True, "file_token": "...", "url": "..."}

工作原理 | How It Works

  1. Prepare - 调用 /drive/v1/files/upload_prepare 获取 upload_id
  2. Upload - 调用 /drive/v1/files/upload_part 上传文件内容
  3. Finish - 调用 /drive/v1/files/upload_finish 完成上传

关键技术点

⚠️ 重要:upload_part接口不需要 checksum 参数!

正确参数:

  • upload_id - 从prepare获取
  • seq - 分片序号(从0开始)
  • size - 文件大小(字节)
  • file - 文件内容(multipart/form-data)

❌ 错误:添加checksum参数 → 返回 1061002 params error ✅ 正确:只传upload_id/seq/size/file → 上传成功

配置 | Configuration

从OpenClaw配置自动读取:

  • channels.feishu.accounts[].appId
  • channels.feishu.accounts[].appSecret

错误处理 | Error Handling

错误码原因解决
1061002params error移除checksum参数
1062008checksum param Invalid不要传checksum
1061021upload id expire重新调用prepare

使用场景 | Use Cases

  • 上传投资报告PDF到飞书云盘
  • 备份生成的文档到云端
  • 批量文件上传自动化

安全说明 | Security

凭证仅用于获取tenant access token并上传文件。不会存储或传输到其他地方。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

飞书多维表格文件上传

Upload files (images, videos, attachments) to Feishu (Lark) Bitable (multi-dimensional table) and return the file_token. Auto-selects direct upload for files...

Registry SourceRecently Updated
1200Profile unavailable
General

飞书会议室智能预订

飞书会议室查询与预订。当用户提到"查会议室"、"订会议室"、"空闲会议室"、"预订会议室"、"开会"、"找个会议室"、"F4会议室"、"紫金会议室"、"哪个会议室有空"、或者创建会议时需要自动匹配空闲会议室时,必须使用此 skill。也适用于用户要求创建日程并指定楼栋/区域时自动完成会议室预订的场景。也适用于用户...

Registry SourceRecently Updated
670Profile unavailable
General

Feishu Card JSON v2

发送飞书互动卡片(Card JSON 2.0)。当需要让飞书用户填写表单、做选择、确认操作、或查看 结构化数据时,发送交互卡片代替纯文字问答。需要 feishu-cards 插件工具: feishu_send_card / feishu_send_form / feishu_update_card。

Registry SourceRecently Updated
3200Profile unavailable
General

XunFei Voice Reply

语音回复技能 - 使用讯飞 TTS 生成语音并发送到飞书。当需要用语音回复用户消息时使用。触发词:用语音、语音回复、切换语音模式、语音模式。

Registry SourceRecently Updated
2970Profile unavailable