Skip to content

Instantly share code, notes, and snippets.

@CypherpunkSamurai
Created March 20, 2026 09:34
Show Gist options
  • Select an option

  • Save CypherpunkSamurai/9a4d6033ca3cfeab2fa797fc4de2196c to your computer and use it in GitHub Desktop.

Select an option

Save CypherpunkSamurai/9a4d6033ca3cfeab2fa797fc4de2196c to your computer and use it in GitHub Desktop.
File Upload SKILL

File Upload Skill

Upload files to temporary file hosting services for sharing and distribution.

Quick Reference

Working Hosts (Tested)

Service Max Size Retention Status
Litterbox (Catbox) 200MB 72h default ✅ Working
GoFile Unlimited 10 days (guest) ✅ Working
0x0.st ~512MB Unknown ✅ Working
VikingFile 5GB 14 days ⚠️ Alternative

1. Litterbox (Catbox.moe) - RECOMMENDED

Litterbox is the temporary file hosting service from Catbox. Files are automatically deleted after the specified time.

API Endpoint

POST https://litterbox.catbox.moe/resources/internals/api.php

Parameters

  • reqtype: "fileupload" (required)
  • time: "1h", "12h", "24h", "72h" (retention time)
  • fileToUpload: The file (multipart form)

Example (Bash)

# Upload file with 72h retention
curl -X POST "https://litterbox.catbox.moe/resources/internals/api.php" \
  -F "reqtype=fileupload" \
  -F "time=72h" \
  -F "fileToUpload=@/path/to/your/file.zip"

# Response: Direct download URL
# https://litterbox.catbox.moe/abc123/filename.zip

Example (Python)

import requests

def upload_to_litterbox(file_path, retention="72h"):
    url = "https://litterbox.catbox.moe/resources/internals/api.php"
    
    with open(file_path, 'rb') as f:
        files = {'fileToUpload': f}
        data = {'reqtype': 'fileupload', 'time': retention}
        response = requests.post(url, files=files, data=data)
    
    return response.text.strip()  # Returns direct URL

# Usage
url = upload_to_litterbox("/path/to/file.zip", "72h")
print(f"Download URL: {url}")

Notes

  • Maximum file size: 200MB
  • No account required
  • Files auto-delete after retention period
  • Direct download links (no ads/waiting)
  • Response is plain text URL

2. GoFile

GoFile provides free file hosting with unlimited file size for guests.

API Endpoint

POST https://store1.gofile.io/uploadFile

Parameters

  • file: The file to upload (multipart form)

Example (Bash)

# Upload file to GoFile
curl -X POST "https://store1.gofile.io/uploadFile" \
  -F "file=@/path/to/your/file.zip"

# Response is JSON with download page URL:
# {"status":"ok","data":{"downloadPage":"https://gofile.io/d/abc123",...}}

Example (Python)

import requests
import json

def upload_to_gofile(file_path):
    url = "https://store1.gofile.io/uploadFile"
    
    with open(file_path, 'rb') as f:
        files = {'file': f}
        response = requests.post(url, files=files)
    
    data = response.json()
    if data['status'] == 'ok':
        return data['data']['downloadPage']
    return None

# Usage
url = upload_to_gofile("/path/to/file.zip")
print(f"Download page: {url}")

Notes

  • Unlimited file size
  • Returns download page (not direct link)
  • Files expire after 10 days for guest uploads
  • Guests may need to click through to download

3. 0x0.st (Alternative)

Simple file hosting with direct links.

Example (Bash)

# Upload file to 0x0.st
curl -F "file=@/path/to/your/file.zip" https://0x0.st

# Response: Direct URL
# https://0x0.st/abc123

Notes

  • Simple, no-frills interface
  • Direct download links
  • May have size limits

4. VikingFile (Alternative)

Business-oriented file hosting.

API Endpoint

POST https://vikingfile.com/api/upload

Notes

  • 5GB max file size
  • 14 day retention
  • May require API key for some features

Recommended Workflow

Multi-Host Upload with Fallback

#!/bin/bash
FILE_PATH="/path/to/your/file.zip"

# Try Litterbox first (recommended)
echo "Uploading to Litterbox..."
LITTERBOX_URL=$(curl -s -X POST "https://litterbox.catbox.moe/resources/internals/api.php" \
  -F "reqtype=fileupload" \
  -F "time=72h" \
  -F "fileToUpload=@$FILE_PATH")

if [[ "$LITTERBOX_URL" == https://* ]]; then
    echo "✅ Litterbox Success!"
    echo "Direct URL: $LITTERBOX_URL"
    exit 0
fi

# Fallback to GoFile
echo "Litterbox failed, trying GoFile..."
GOFILE_RESPONSE=$(curl -s -X POST "https://store1.gofile.io/uploadFile" \
  -F "file=@$FILE_PATH")

GOFILE_URL=$(echo "$GOFILE_RESPONSE" | grep -o '"downloadPage":"[^"]*"' | cut -d'"' -f4)

if [[ -n "$GOFILE_URL" ]]; then
    echo "✅ GoFile Success!"
    echo "Download page: $GOFILE_URL"
    exit 0
fi

# Last resort: 0x0.st
echo "GoFile failed, trying 0x0.st..."
URL=$(curl -s -F "file=@$FILE_PATH" https://0x0.st)
echo "✅ 0x0.st Success!"
echo "Direct URL: $URL"

Python Multi-Host Upload

import requests
import os

def upload_file_multi(file_path):
    """Upload file with multiple fallback hosts."""
    
    # Method 1: Litterbox (preferred)
    try:
        print("Trying Litterbox...")
        with open(file_path, 'rb') as f:
            resp = requests.post(
                "https://litterbox.catbox.moe/resources/internals/api.php",
                files={'fileToUpload': f},
                data={'reqtype': 'fileupload', 'time': '72h'},
                timeout=300
            )
        url = resp.text.strip()
        if url.startswith('https://'):
            print(f"✅ Litterbox: {url}")
            return url
    except Exception as e:
        print(f"Litterbox failed: {e}")
    
    # Method 2: GoFile
    try:
        print("Trying GoFile...")
        with open(file_path, 'rb') as f:
            resp = requests.post(
                "https://store1.gofile.io/uploadFile",
                files={'file': f},
                timeout=300
            )
        data = resp.json()
        if data.get('status') == 'ok':
            url = data['data']['downloadPage']
            print(f"✅ GoFile: {url}")
            return url
    except Exception as e:
        print(f"GoFile failed: {e}")
    
    # Method 3: 0x0.st
    try:
        print("Trying 0x0.st...")
        with open(file_path, 'rb') as f:
            resp = requests.post(
                "https://0x0.st",
                files={'file': f},
                timeout=300
            )
        url = resp.text.strip()
        if url.startswith('https://'):
            print(f"✅ 0x0.st: {url}")
            return url
    except Exception as e:
        print(f"0x0.st failed: {e}")
    
    return None

# Usage
if __name__ == "__main__":
    url = upload_file_multi("/path/to/file.zip")
    if url:
        print(f"\nDownload URL: {url}")
    else:
        print("All uploads failed")

File Size Guidelines

Service Max Size Retention Best For
Litterbox 200MB 1-72h Quick sharing, direct links
GoFile Unlimited 10 days Large files, longer storage
0x0.st ~512MB Unknown Simple, direct links
VikingFile 5GB 14 days Business use

Troubleshooting

Litterbox returns error/empty

  • Check file size is under 200MB
  • Ensure proper multipart form encoding
  • Try different retention time (e.g., "24h" instead of "72h")

GoFile returns 401/403

  • Wait a few seconds between uploads
  • Check if file type is allowed
  • May have rate limits

Upload times out

  • Use larger timeout: curl --max-time 300 ...
  • Check network connectivity
  • Try alternative host

URL not returned properly

  • Check response format (JSON vs plain text)
  • Parse response appropriately

Related Services

Service URL Notes
Catbox https://catbox.moe Permanent hosting by same team
Pomf https://pomf.cat Similar to Catbox
Uguu https://uguu.se Temporary file hosting
MixDrop https://mixdrop.ag Video/file hosting
Pixeldrain https://pixeldrain.com Fast file sharing

Security Notes

  • Temporary file hosts are not for sensitive data
  • Files are publicly accessible via URL
  • No encryption or password protection
  • Files auto-delete after retention period
  • Use encryption before uploading if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment