file-upload

Installation
SKILL.md

File upload

Upload a local file to the existing R2 bucket public. Return the public URL. Copy it to the clipboard.

Wrangler is already installed globally (bun add -g wrangler) and already authenticated (wrangler login). Bucket public already exists. Custom domain assets.shahram.dev is already attached. Do not log in, create a bucket, or attach a domain.

Steps

  1. Resolve the local file to an absolute path. Confirm it exists. Done when: the path is absolute and the file is on disk.

  2. Build the object key from a 24-byte hex prefix plus the original extension: $(openssl rand -hex 24).${EXT} Done when: key is {48-hex-chars}.{ext} with no original basename.

  3. PUT to the live bucket (Wrangler v4 is local unless --remote):

Installs
1
GitHub Stars
4
First Seen
Sep 22, 2026