← 返回
未分类 中文

Tmpfiles Upload

Upload files (images, PDFs, documents) to tmpfiles.org and send download links via messaging platforms. Use when: (1) User asks to send screenshots/files via...
将文件(图片、PDF、文档)上传到 tmpfiles.org 并通过消息平台发送下载链接。使用场景:(1)用户请求通过...发送截图/文件
turbos7 turbos7 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 478
下载
💾 1
安装
1
版本
#latest

概述

tmpfiles.org File Upload

Upload files to tmpfiles.org (temporary file hosting) and get a download link.

When to Use

  • Sending screenshots to Feishu when direct upload fails
  • Sharing files temporarily (links expire after ~1 hour)
  • Quick file sharing without authentication

Upload Script

import requests

def upload_to_tmpfiles(file_path):
    """Upload file to tmpfiles.org and return download URL"""
    with open(file_path, 'rb') as f:
        r = requests.post('https://tmpfiles.org/api/v1/upload', files={'file': f})
        data = r.json()
        if data.get('status') == 'success':
            # Replace org/ with org/dl/ for direct download
            return data['data']['url'].replace('org/', 'org/dl/')
        raise Exception(f"Upload failed: {data}")

Usage in OpenClaw

Step 1: Capture screenshot (if needed)

/usr/sbin/screencapture -x ~/Desktop/screenshot.png

Step 2: Upload to tmpfiles.org

python3 -c "
import requests
with open('/path/to/file.png', 'rb') as f:
    r = requests.post('https://tmpfiles.org/api/v1/upload', files={'file': f})
    d = r.json()
    if d.get('status') == 'success':
        print(d['data']['url'].replace('org/', 'org/dl/'))
"

Step 3: Send link via message

{
  "action": "send",
  "channel": "feishu",
  "message": "文件链接:https://tmpfiles.org/dl/xxx",
  "target": "user_id"
}

Notes

  • Links expire after ~1 hour
  • Max file size: ~100MB
  • Files are publicly accessible while active
  • Not suitable for sensitive/permanent storage

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 13:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,428 📥 326,966
design-media

MiniMax Image Generation

turbos7
MiniMax 图片生成技能。集成文生图和图生图功能,支持从文本描述生成图片,也可基于参考图生成新图片。触发场景:(1) 用户请求生成图片,(2) 用户提供描述并要求生成图片,(3) 用户上传参考图并要求基于该图生成新图,(4) 用户想要生
★ 0 📥 414
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,495 📥 559,279