Minimal React + Vite app that consumes the published SDK and lets you run a real resumable upload end to end — file select, progress, and pause/resume/abort.
A plain Vite + React app that renders <FastPixUploader />
from the published @fastpix/fp-react-uploader
package. Nothing to configure in code — you paste a signed upload URL into the
page at runtime. Edits to src/App.jsx hot-reload as usual.
cd example
npm installThis pulls React 19, Vite, and the published SDK (the
"@fastpix/fp-react-uploader" entry in package.json).
npm run devOpen the URL Vite prints (default http://localhost:5173).
- The page shows a URL input and the uploader.
- Paste a signed upload URL, then pick or drop a file.
- As chunks upload, the track fills and the component reflects
resolving → uploading → success. - Lifecycle events are logged to the browser console (
progress,success,error) — see the callbacks insrc/App.jsx.
Nothing to edit — the signed upload URL is pasted into the input on the page.
You generate that URL server-side with the
Upload media from device
API, using your Access Token and Secret Key from
https://dashboard.fastpix.com. Keep that call on your server so your
credentials never reach the browser.
After the uploader reports success:
- Visit
https://dashboard.fastpix.com → Media. - The new upload appears and moves to Ready once processing finishes.
- Uploader shows an error the moment you pick a file — you didn't enter a
URL first. The
endpointresolver insrc/App.jsxthrows when the input is empty; that surfaces as the recoverable error state by design. Enter a URL and pick the file again. - Upload fails immediately — the signed URL is expired or malformed. Signed upload URLs are short-lived; generate a fresh one.
- Want the local build instead of the published package — this example is
pinned to the published npm version on purpose. To test unreleased changes,
add a Vite alias pointing
@fastpix/fp-react-uploaderat the repo's../dist.
This example lives at example/ inside the SDK repo. The SDK's package.json
uses "files": ["dist"], so the example never ships to npm — it stays in
source control as documentation.