Getting started

Quickstart

Upload your first file in under a minute — anonymously from the browser, or programmatically with the three-step presigned upload flow.

Upload in the browser

The fastest path needs no code and no account:

  1. Go to /upload.
  2. Drag a file onto the dropzone, or click to choose one. Anonymous uploads support files up to 100 MB.
  3. Pick a visibility (public or unlisted) and, optionally, sign the file with your wallet for provenance.
  4. On success you get a copyable share link, a direct download link, and a QR code.

Tip

Connect a wallet first and your limits jump to 2 GB per file, the upload lands in your private drive, and you can choose private visibility with server-side or end-to-end encryption.

Upload programmatically

Uploads are a three-step, direct-to-storage flow: ask the API to presign a slot, PUT the bytes straight to R2, then complete to finalize the record. File bytes never pass through the app server.

1. Request a presigned URL

Send the file metadata. The response contains a temporary uploadUrl and the exact headers to echo on the PUT.

presign.shShell
curl -X POST https://udrive.one/api/upload/presign \
  -H 'content-type: application/json' \
  -d '{
    "name": "dataset.csv",
    "size": 20480,
    "contentType": "text/csv",
    "visibility": "unlisted"
  }'
responseJSON
{
  "fileId": "0f3c…",
  "key": "udrive/2026/06/Hb3k…/dataset.csv",
  "uploadUrl": "https://<r2-bucket>.r2.cloudflarestorage.com/…?X-Amz-Signature=…",
  "headers": { "content-type": "text/csv" }
}

2. Upload the bytes

PUT the file to uploadUrl with the returned headers. The presigned PUT is valid for a short window (≤ 120s).

Shell
curl -X PUT "$UPLOAD_URL" \
  -H 'content-type: text/csv' \
  --data-binary @dataset.csv

3. Finalize

Tell the API the bytes have landed. It HEADs the object to confirm size, verifies a provenance signature if you supplied one, flips the file to active, and returns the public share URL.

Shell
curl -X POST https://udrive.one/api/upload/complete \
  -H 'content-type: application/json' \
  -d '{ "fileId": "0f3c…", "sha256": "<optional hex digest>" }'
responseJSON
{ "shortId": "a1B2c3D4e5F6", "shareUrl": "https://udrive.one/f/a1B2c3D4e5F6" }

Note

Prefer not to manage three calls by hand? The TypeScript SDK wraps this whole flow in a single upload() call.

Next steps