iuv oss
iuv oss provides direct access to iuv’s Cloudflare R2 object storage.
All objects are scoped to your user ID — you can only access your own files.
Upload a file
Section titled “Upload a file”iuv oss upload ./image.pngiuv oss upload ./image.png --key photos/avatar.pngiuv oss upload ./report.pdf --publiciuv oss upload ./data.json --content-type application/json --json| Flag | Default | Description |
|---|---|---|
-k, --key | filename | Remote key (path in R2 under your user prefix) |
-c, --content-type | auto-detected | Content-Type header for the object |
--public | private | Make the object publicly accessible |
Download a file
Section titled “Download a file”iuv oss download user_id/photos/avatar.pngiuv oss download user_id/photos/avatar.png --output ./local-copy.pngThe full scoped key (including the user prefix returned by upload) must be provided.
Inspect object metadata
Section titled “Inspect object metadata”iuv oss stat user_id/photos/avatar.pngiuv oss stat user_id/photos/avatar.png --jsonOutput includes: key, size, contentType, visibility, lastModified, etag.
Delete an object
Section titled “Delete an object”iuv oss rm user_id/photos/avatar.pngChange visibility
Section titled “Change visibility”iuv oss visibility user_id/photos/avatar.png publiciuv oss visibility user_id/photos/avatar.png privateVisibility changes update R2 object metadata in-place — no file migration required. Private objects require authentication to download; public objects return an open presigned URL.
How uploads work
Section titled “How uploads work”iuv oss uploadcallsPOST /v1/oss/upload-urlto obtain a presigned PUT URL (valid 15 min).- The file is uploaded directly to Cloudflare R2 — no data passes through the API worker.
- The final scoped key is printed on success; save it for later use.
How downloads work
Section titled “How downloads work”iuv oss download calls GET /v1/oss/download?key=<key> to obtain a presigned GET URL (valid 1 hour),
then fetches directly from R2.
- Public objects: the download URL is returned without authentication.
- Private objects: a valid Clerk JWT or API key is required.
Global options
Section titled “Global options”All subcommands accept:
--api-base-url <url> Override the API base URL (default: https://api.iuvdev.com)--json Output machine-readable JSON