Skip to content

Repository files navigation

quickpost

A lightweight, ephemeral file and code snippet sharing platform. Upload, get a short link, share it. Files auto-delete after 24 hours. No accounts, no tracking.

Live at qpst.cc


Features

  • File Upload -- Select, drag-and-drop, paste from clipboard, or browse one or multiple files. Supports images, PDFs, archives, and any file type up to 50 MB.
  • Code Snippets -- Paste text with syntax highlighting for Python, JavaScript, TypeScript, HTML, CSS, JSON, Java, C/C++, SQL, and Markdown.
  • URL Shortener -- Paste any long URL and get a qpst.cc/<id> link, with support for custom aliases.
  • QR Code Generator -- Generate and download QR codes for URLs or text on the fly.
  • Code Viewer -- Line numbers, word wrap toggle, download, copy, raw view, re-edit, and language switching.
  • Short URLs -- Clean qpst.cc/<id> links with optional custom filenames.
  • QR Codes -- Generate a scannable QR code for any upload link.
  • Upload History -- Client-side history stored in localStorage. Never touches the server.
  • Direct File Links -- Image and file URLs resolve directly (e.g., qpst.cc/abc.png serves the file).
  • Upload API -- REST endpoint for terminal, scripts, and third-party tools. See API documentation below.

How It Works

  1. Upload Architecture -- Web and Shell clients request a presigned PUT URL from /api/upload-url, upload files directly to Cloudflare R2 (bypassing Vercel's 4.5MB limits), and register metadata in Supabase. The /api/upload endpoint provides a single-request alternative for ShareX and standard API usage.
  2. View Routing -- The SPA extracts the ID from the URL and fetches metadata from Supabase. It immediately redirects if it's a shortened URL, otherwise it loads the object from R2 and renders it via Prism.js (code) or native tags (images/downloads).
  3. Automated Expiry -- Ephemeral storage is enforced via Cloudflare R2 Object Lifecycle rules, which automatically delete all objects 24 hours after creation.

API

quickpost exposes a public upload API. No authentication required.

POST /api/upload

Accepts a multipart/form-data request with a single file. Returns the share URL.

Form fields:

Field Required Description
file Yes The file to upload
filename No Custom filename (without extension). If omitted, a random 3-character ID is generated.

Response format:

  • Plain text (default) -- Returns just the URL followed by a newline. Ideal for piping in scripts.
  • JSON -- Set Accept: application/json header to receive { "url", "id", "filename" }.

Size limit: 4.5 MB (Vercel serverless constraint). For larger files, use the shell script or the web UI.

Upload via curl

# Upload a file (returns the share URL)
curl -F file=@screenshot.png https://qpst.cc/api/upload

# Upload with a custom name
curl -F file=@screenshot.png -F filename=myshot https://qpst.cc/api/upload

# Pipe from stdin
echo "print('hello')" | curl -F "file=@-;filename=hello.py" https://qpst.cc/api/upload

# Get JSON response
curl -F file=@image.png -H "Accept: application/json" https://qpst.cc/api/upload

JSON response example:

{
  "url": "https://qpst.cc/abc.png",
  "id": "abc",
  "filename": "abc.png"
}

Shell Script (up to 50 MB)

The qp shell script uses a two-step upload flow (presigned URL then direct-to-storage PUT), bypassing the 4.5 MB API limit. Supports files up to 50 MB from any terminal.

Install:

Linux / macOS:

curl -sL https://qpst.cc/install.sh | bash

Windows (PowerShell):

irm https://qpst.cc/install.ps1 | iex

Usage:

qp screenshot.png           # Upload a file, prints URL
cat code.py | qp             # Pipe from stdin
qp -n myname notes.md        # Upload with custom name
qp --help                    # Show help

Environment variables:

Variable Default Description
QP_URL https://qpst.cc Base URL to upload to. Override for self-hosted instances.

ShareX

  1. Download quickpost.sxcu.
  2. Open ShareX > Destinations > Custom uploader settings.
  3. Click Import > From file, and select the downloaded .sxcu file.
  4. Set quickpost as your active Image/Text/File uploader.

Screenshots and files will be uploaded to quickpost automatically, with the share URL copied to your clipboard.

Telegram Bot (Mobile Uploads)

You can upload files, photos, text snippets, and shorten URLs directly from your phone using the official Telegram bot.

  1. Open Telegram and message @qpst_bot.
  2. Send any photo, file, text, or long URL to the chat.
  3. The bot will instantly reply with your qpst.cc/<id> share link.

(Note: Telegram imposes a 20MB limit on files sent to bots).

OS Integrations (Right-Click Upload)

You can integrate quickpost directly into your operating system's right-click context menus.

Windows (Send To Menu)

  1. Ensure you have installed the PowerShell CLI using the script above.
  2. Download and run windows-sendto-quickpost.bat.
  3. You can now right-click any file > Send to > quickpost. The share link will be automatically copied to your clipboard.

macOS (Quick Action)

  1. Ensure you have installed the Bash CLI using the script above.
  2. Open Automator and create a new Quick Action.
  3. Workflow receives current files or folders in Finder.
  4. Add a Run Shell Script action, pass input as arguments.
  5. Paste: /Users/YOUR_USER/.local/bin/qp "$1" | pbcopy
  6. Save as "Upload to quickpost". You can now right-click files in Finder to upload!

POST /api/register

Metadata registration endpoint used internally by the shell script. Registers a file that was uploaded directly to R2 via a presigned URL.

JSON body:

Field Required Description
short_id Yes The file identifier (alphanumeric, hyphens, underscores)
filename Yes Display filename (e.g., abc.py)
storage_path Yes R2 object key (e.g., abc.py)

Response: JSON { "url", "id", "filename" }


Roadmap

  • File upload with drag-and-drop, paste, multi-file support
  • Code snippet viewer with Prism.js syntax highlighting
  • Upload API with curl and ShareX support
  • Shell script for terminal uploads (up to 50 MB)
  • URL shortener -- Shorten external URLs with custom aliases
  • QR Generator -- Standalone QR code generation
  • OS Integrations -- Right-click upload menus for Windows & macOS
  • Telegram bot -- Upload files via Telegram and receive the share link in chat
  • Progressive Web App (PWA) -- Installable native-feeling mobile app
  • Browser Extension -- Right-click upload integration for Chrome/Firefox
  • Configurable limits -- Choose expiry duration (1h, 6h, 12h, 24h) or auto-delete after N downloads
  • Password-protected uploads -- Optional password gate on shared files

Contributing

Contributions are welcome. If you'd like to improve quickpost, feel free to submit a Pull Request.

To report bugs or request features: github.com/lunagus/quickpost/issues


License

GPL-3.0

Contributors

Languages