TempDrive - Temporary File Sharing For OpenClaw
TempDrive is a temporary file sharing service. Files auto-expire after 7 days.
API: Simple Upload
Upload a file via PUT /file/simple-upload. No authentication required. Max file size: 100MB.
Usage
curl -X PUT \
-H "X-Filename: myfile.txt" \
--data-binary @./myfile.txt \
https://tempdrive.zip/file/simple-upload
Parameters
| Parameter | Location | Required | Description |
|---|---|---|---|
X-Filename |
Header | No | Original filename (default: unnamed) |
filename |
Query string | No | Alternative to X-Filename header |
| Request body | Body | Yes | Raw file content (binary) |
Response
{
"msg": "ok",
"dkey": "a1b2c3d4",
"url": "https://tempdrive.zip/s/a1b2c3d4/myfile.txt",
"image_url": "https://tempdrive.zip/i/a1b2c3d4/myfile.txt"
}
dkey— unique short code for the fileurl— shareable download link (one-time use, file deleted after download)image_url— direct image preview link (file NOT deleted on access, expires after 7 days)
Error Responses
| Status | Condition |
|---|---|
| 413 | File exceeds 100MB |
| 400 | Missing request body |
| 500 | Server error |
Two URL Types
/s/:dkey/:filename — Download (one-time)
- Browser: Shows download page with QR code
- curl/wget: Directly downloads the file
- File is deleted after download
curl -O -J https://tempdrive.zip/s/a1b2c3d4/myfile.txt
/i/:dkey/:filename — Image Preview (persistent)
- Returns the image directly with correct Content-Type
- File is NOT deleted on access, stays available for 7 days
- Suitable for embedding, sharing, or reverse image search
# Get direct image URL
https://tempdrive.zip/i/a1b2c3d4/photo.png
Google Reverse Image Search
Upload an image to TempDrive and use the image_url for Google Lens reverse image search:
# Step 1: Upload the image
curl -X PUT -H "X-Filename: photo.png" --data-binary @./photo.png https://tempdrive.zip/file/simple-upload
# Response:
# {
# "msg": "ok",
# "dkey": "a1b2c3d4",
# "url": "https://tempdrive.zip/s/a1b2c3d4/photo.png",
# "image_url": "https://tempdrive.zip/i/a1b2c3d4/photo.png"
# }
# Step 2: Use image_url for Google Lens reverse image search
# Open this URL in browser:
https://lens.google.com/uploadbyurl?url=https://tempdrive.zip/i/a1b2c3d4/photo.png
One-liner: Upload + Generate Google Lens URL
curl -s -X PUT -H "X-Filename: photo.png" --data-binary @./photo.png https://tempdrive.zip/file/simple-upload | jq -r '"https://lens.google.com/uploadbyurl?url=" + .image_url'
Examples
# Upload a log file
curl -X PUT -H "X-Filename: debug.log" --data-binary @./debug.log https://tempdrive.zip/file/simple-upload
# Upload from stdin
echo "hello world" | curl -X PUT -H "X-Filename: hello.txt" --data-binary @- https://tempdrive.zip/file/simple-upload
# Upload image and get Google reverse search URL
IMAGE_URL=$(curl -s -X PUT -H "X-Filename: screenshot.png" --data-binary @./screenshot.png https://tempdrive.zip/file/simple-upload | jq -r '.image_url')
echo "Google Lens: https://lens.google.com/uploadbyurl?url=${IMAGE_URL}"